Nice to hear about good results.
It is a bug that 1 << 32 does not work as expected. You have reported this before, but it must have escaped my mind; it will be fixed in the next release (this time I have made the necessary change).
Search found 1195 matches
- 19 Apr 2021 9:02
- Forum: Visual Prolog
- Topic: VIP Version 10!
- Replies: 1
- Views: 34
- 6 Apr 2021 11:37
- Forum: Visual Prolog
- Topic: making predicates procedures - single facts?
- Replies: 1
- Views: 135
Re: making predicates procedures - single facts?
single facts are automatically retracted when a new fact is asserted.
But in general I think you should use fact variables:
See also Facts, and it is also a good idea to follow the tutorials.
But in general I think you should use fact variables:
Code: Select all
facts
someValue : integer := 2.
- 5 Apr 2021 11:21
- Forum: Visual Prolog
- Topic: How to check existence of an object
- Replies: 5
- Views: 187
- 4 Apr 2021 13:34
- Forum: Visual Prolog
- Topic: introspection
- Replies: 8
- Views: 433
Re: introspection
Considering what I think you ask the short answer is no . Assume this: interface window ... end interface window interface control supports window ... end interface control class textControl : control ... end class textControl We have a class textControl which constructs objects of the interface typ...
- 28 Mar 2021 20:28
- Forum: Visual Prolog
- Topic: introspection
- Replies: 8
- Views: 433
Re: introspection
A typeLibrary is a runtime representation of a type, it is only documented in form of the corresponding interface ($(ProDir)\pfc\reflection\typeLibrary\typeLibrary.i).
Type libraries are used heavily behind the scenes to make polymorphism work. But I doubt that you will need it for anything.
Type libraries are used heavily behind the scenes to make polymorphism work. But I doubt that you will need it for anything.
- 28 Mar 2021 20:14
- Forum: Visual Prolog
- Topic: writef not printing to Message Window
- Replies: 6
- Views: 344
Re: writef not printing to Message Window
While vpi::processEvents will help to update the windows, it will also allow users to press on menu-entries, buttons, etc. So it may mix other processing in the "current" one, hence it has many aspects in common with multi-threaded programming or (more precisely) coroutines and asynchronou...
- 28 Mar 2021 14:06
- Forum: Visual Prolog
- Topic: Predicate called from menu must be a procedure (?)?
- Replies: 3
- Views: 225
Re: Predicate called from menu must be a procedure (?)?
You can also use orelse:
Code: Select all
clauses
runExperiment() :-
startExperiment() orelse succeed.
- 24 Mar 2021 18:27
- Forum: Visual Prolog
- Topic: From string to integer
- Replies: 8
- Views: 436
Re: From string to integer
Sorry, I typed the wrong predicate, it should be:
Code: Select all
Number = tryToTerm(integer, String)
- 24 Mar 2021 15:44
- Forum: Visual Prolog
- Topic: From string to integer
- Replies: 8
- Views: 436
Re: From string to integer
Given that the format match that of a Visual Prolog number you can use:
where integer could instead be for example real.
Code: Select all
Number = tryConvert(integer, String)
- 24 Mar 2021 15:39
- Forum: Visual Prolog
- Topic: introspection
- Replies: 8
- Views: 433
Re: introspection
The build-in predicate typeLibraryOf can give you the typeLibrary of any term. That will give you the type which it has "here" But it seems you are looking for the construction type and that can unfortunately not be found by reflection/introspection. But if you have a suspicion about the t...
- 24 Mar 2021 13:35
- Forum: Visual Prolog
- Topic: writef not printing to Message Window
- Replies: 6
- Views: 344
Re: writef not printing to Message Window
Please read about [code] ... [/code] formatting in the forum guides.
- 21 Mar 2021 19:52
- Forum: Visual Prolog
- Topic: introspection
- Replies: 8
- Views: 433
Re: introspection
I m not sure I understand what you mean, perhaps you could give more details?
- 18 Mar 2021 18:13
- Forum: Visual Prolog
- Topic: Einstein's Riddle
- Replies: 3
- Views: 265
Re: Einstein's Riddle
The brief answer is: You cannot use this code in Visual Prolog. (You can however (I guess/believe) run it in our PIE program (Prolog Interpreter Engine), which is an example program comes with Visual Prolog that implements a classical Prolog system much closer to ISO Prolog). I don't know how much o...
- 16 Mar 2021 13:36
- Forum: Visual Prolog
- Topic: Implementing a property using a fact
- Replies: 2
- Views: 245
Re: Implementing a property using a fact
I guess that you didn't declare the fact variable in the implementation:
Code: Select all
implement slot
...
class facts
aDiagram : ...
...
end implement slot
- 14 Mar 2021 21:07
- Forum: Visual Prolog
- Topic: Example for removeAllBy
- Replies: 5
- Views: 465
Re: Example for removeAllBy
The predicate removeAllBy is used when you want to supply your own comparison routine. For strings it could for example (as above) be a comparison that consider uppercase and lowercase letters the same. But for numbers it would (almost always) be natural to use the normal number comparison. clauses ...