Search found 1165 matches

by Thomas Linder Puls
12 Jul 2020 23:10
Forum: Visual Prolog
Topic: Draw vertical text using GDI+ stringFormat
Replies: 4
Views: 1136

Re: Draw vertical text using GDI+ stringFormat

This is more or less a direct translation of the code from the Microsoft example (however using a rectF rather than a pointF ): predicates onPaint : window::paintresponder. clauses onPaint(_, _, GDI) :- HDC = GDI:getNativeGraphicContext(IsReleaseNeeded), Graphics = graphics::createFromHDC(HDC), Font...
by Thomas Linder Puls
12 Jul 2020 22:43
Forum: Visual Prolog
Topic: Loading a bmp and jpg to a dialog
Replies: 12
Views: 1622

Re: Loading a bmp and jpg to a dialog

Notice that the gdi+ stuff also have an object interface (in $(ProDir)\pfc\gui\gdiplus ). Also notice that gdi+ can load images from many file formats. So all in all the code can also be made like this: facts welldefsch_bmp : image := image::createFromFile(@"welldefsch.bmp"). welldefsch_jpg : image ...
by Thomas Linder Puls
3 Jul 2020 12:11
Forum: Visual Prolog
Topic: Replace nulls in ::string
Replies: 6
Views: 1285

Re: Replace nulls in ::string

The result you show looks like the thing we have called a msStringSeq (Microsoft String Sequence). There are predicates in the windowsApi class for converting to and from such "sequences": domains msStringSeq = pointer. % @short A sequence of null (two bytes) terminated Unicode strings. % The sequen...
by Thomas Linder Puls
30 Jun 2020 14:49
Forum: Visual Prolog
Topic: Question about example in A Beginner's Guide to Visual Prolog
Replies: 8
Views: 1591

Re: Question about example in A Beginner's Guide to Visual Prolog

You don't actually ask any question, but I guess you wonder how the code works? Or alternatively that you wonder why you can't follow the expected behavior in the debugger? Conceptual behavior The second parameter of add1 is an output parameter. If I introduce a Result variable in the second clause,...
by Thomas Linder Puls
22 Jun 2020 11:50
Forum: Visual Prolog
Topic: Memory Profiler
Replies: 1
Views: 1113

Re: Memory Profiler

Thank you, we will look at it.
by Thomas Linder Puls
22 Jun 2020 11:16
Forum: Visual Prolog
Topic: Build 906 - 64 bit operations
Replies: 3
Views: 1435

Re: Build 906 - 64 bit operations

Yes, there is a problem. We will look at it. For now you can write:

Code: Select all

        BB_Index = bit::toBigEndian64(hasDomain(unsigned64, 1) << 0 + IndexIn),
Using hasDomain like that ensures that the operation is performed as a unsigned64 bit operation.
by Thomas Linder Puls
10 Jun 2020 8:45
Forum: Visual Prolog
Topic: Tab Forms and VP9
Replies: 1
Views: 1251

Re: Tab Forms and VP9

The choices in in the "yale key" depends on what is present in the project. In earlier days the tabControl would be present by default, but now you will have to add it explicitly: locate $(ProDir)\pfc\gui\controls in the project tree Right click the node an select Add.. in the context menu Browse to...
by Thomas Linder Puls
3 Jun 2020 8:32
Forum: Visual Prolog
Topic: Visual Prolog Speed
Replies: 11
Views: 2213

Re: Visual Prolog Speed

array2M has 0-based indices. But if you ignore the 0 indices and just make the array one larger at each dimension then you can use 1-based indices. The initialization code can look like this: Size = 4000, Array = array2M::new(Size + 1, Size + 1), foreach N = std::fromTo(1, Size) do foreach M = std:...
by Thomas Linder Puls
2 Jun 2020 8:28
Forum: Visual Prolog
Topic: Wishlist Item
Replies: 6
Views: 2267

Re: Wishlist Item

Visual Prolog 9 build 906: trailingZeroBits64 has been added to bit , and bit counts has been changes to positive predicates bitCount : (unsigned Value) -> positive Count. bitCount64 : (unsigned64 Value) -> positive Count. % @short Returns the number of non-zero bits % @end predicates isPow2 : (unsi...
by Thomas Linder Puls
2 Jun 2020 8:24
Forum: Visual Prolog
Topic: Source file too large?
Replies: 5
Views: 4856

Re: Source file too large?

This problem is solved in Visual Prolog 9 build 906.

(The problem occurred for all editor content sizes N * 8192 - 1).
by Thomas Linder Puls
2 Jun 2020 8:17
Forum: Visual Prolog
Topic: unsigned64 bit operations
Replies: 3
Views: 4637

Re: unsigned64 bit operations

This problem is solved in Visual Prolog 9 build 906.
by Thomas Linder Puls
26 May 2020 15:58
Forum: Visual Prolog
Topic: unsigned64 bit operations
Replies: 3
Views: 4637

Re: unsigned64 bit operations

This problem has been solved, but unfortunately we forgot to merge it into Vip 9 (903-905).
by Thomas Linder Puls
26 May 2020 15:53
Forum: Visual Prolog
Topic: Wishlist Item
Replies: 6
Views: 2267

Re: Wishlist Item

It is not a problem to add such a predicate. But I wonder whether the result should be an unsigned64 or an unsigned (clearly the number is at most 64, so it will easily fit into an unsigned)?
by Thomas Linder Puls
26 May 2020 8:00
Forum: Visual Prolog
Topic: Domains specification in both .i and .cl files
Replies: 3
Views: 1660

Re: Domains specification in both .i and .cl files

Sometimes you may see errors that comes from lacking #include directives. The #include directive may have been inserted automatically, but too late the error was already listed. Building again usually solves that kind of problems.
by Thomas Linder Puls
26 May 2020 7:34
Forum: Visual Prolog
Topic: VIP 802 Find in Files stopped working
Replies: 6
Views: 3595

Re: VIP 802 Find in Files stopped working

Next time you may rename <project>.env instead and compare the files and/or send it to us.