
Search found 405 matches
- 13 Mar 2023 14:18
- Forum: Visual Prolog
- Topic: Date time and hour
- Replies: 5
- Views: 193
Re: Date time and hour
Thanks! 

- 12 Mar 2023 18:01
- Forum: Visual Prolog
- Topic: Date time and hour
- Replies: 5
- Views: 193
Re: Date time and hour
This code snippet should do it for you. On dialog creation you can start a timer with the interval you want, e.g. 1000 milliseconds. Store the timer's handle in a static fact. Use the IDE to create an onTimer/2 event that is invoked whenever the timer passes the threshold. Update the time display in...
- 11 Mar 2023 14:57
- Forum: Visual Prolog
- Topic: Date time and hour
- Replies: 5
- Views: 193
Re: Date time and hour
How to get formatted time: clauses run() :- Tnow = time::now(), TimeStamp = Tnow:formatDateTime("dd-MM-yyyy", " HH:mm:ss"), stdio::write("\nTime now: ", TimeStamp), _ = console::readLine(). It's up to you to determine if, how often and how you want to update the text bo...
- 9 Mar 2023 13:38
- Forum: Visual Prolog
- Topic: Code Improvement
- Replies: 2
- Views: 117
Re: Code Improvement
Take a look at the attached files. I think a better strategy that you could use would be to do the following: Treat all the signs and symptoms as generic "observations" Put the observations into a consultable fact file (not hard-coded as in test.pro Make disease diagnosis contingent upon f...
- 8 Mar 2023 14:22
- Forum: Visual Prolog
- Topic: Code Improvement
- Replies: 2
- Views: 117
Re: Code Improvement
Your code appears to be functionally incomplete. For example, xpositive/2 and xnegative/2 are asserted but not used and the run/0 clauses don't work like I think they ought to. As a starting point, I would suggest that you try the following: Specify your own domains to make your code easier to follo...
- 16 Feb 2023 13:04
- Forum: Visual Prolog Tips & Samples
- Topic: PropertyDepot - property code generator and repository
- Replies: 6
- Views: 366
Re: PropertyDepot - property code generator and repository
Fixed it. I neglected to consider empty string when checking for unquoted string value.
myString : string should generate myString_fact : string := erroneous. and supporting clauses.
Thanks.
myString : string should generate myString_fact : string := erroneous. and supporting clauses.
Thanks.
- 15 Feb 2023 14:50
- Forum: Visual Prolog Tips & Samples
- Topic: PropertyDepot - property code generator and repository
- Replies: 6
- Views: 366
Re: PropertyDepot - property code generator and repository
Updated properties_PACKAGE folder attached as ZIP file.
Attachment deleted. Use the package in the 16 February 2023 post below.
Attachment deleted. Use the package in the 16 February 2023 post below.
- 14 Feb 2023 14:58
- Forum: Visual Prolog Tips & Samples
- Topic: PropertyDepot - property code generator and repository
- Replies: 6
- Views: 366
Re: PropertyDepot - property code generator and repository
Thanks for the sciLexer update -- that's much better. I realize that autoFormat will change the layout. I laid out the generated code to be easy to read in the generated-code dialog. About the string problem, did you not quote the string value or did you see different kind of error? There is a speci...
- 14 Feb 2023 13:51
- Forum: Visual Prolog
- Topic: Another feature suggestion
- Replies: 4
- Views: 227
Re: Another feature suggestion
Thanks ... it seems I've been under-thinking this. 

- 13 Feb 2023 17:28
- Forum: Visual Prolog
- Topic: Another feature suggestion
- Replies: 4
- Views: 227
Another feature suggestion
After having explored PropertyDepot ideas, it seems that a nice feature for VP would be a compiler directive that could automatically insert the property getters and setters into the implementation file. That would make a database of properties less important. Maybe something like this: interface my...
- 12 Feb 2023 18:38
- Forum: Visual Prolog Tips & Samples
- Topic: PropertyDepot - property code generator and repository
- Replies: 6
- Views: 366
Re: PropertyDepot - property code generator and repository
PropertyDepot is updated as follows: Domains may be prefixed with '::' propColor : ::color Parameter labels are allowed myTerm : trm( string ID, real Value ) myRect : vpiDomains::rct( integer X, integer Y, integer Right, integer Bottom ) Tuple definitions are supported, as is star-list syntax propT...
- 26 Nov 2022 14:27
- Forum: Visual Prolog Tips & Samples
- Topic: PropertyDepot - property code generator and repository
- Replies: 6
- Views: 366
PropertyDepot - property code generator and repository
Ever get annoyed by all the code you have to type to support properties ... and then you need to make a few changes and have to reorganize it all? Yeah, me too! PropertyDepot is will let you maintain a database of your own sets of properties and generate property or single fact code that you can pas...
- 24 Nov 2022 13:02
- Forum: Visual Prolog
- Topic: Tiny feature suggestion for next VP version
- Replies: 3
- Views: 428
Re: Tiny feature suggestion for next VP version
The predicate inc() would be useful when calculating running means, so I guess it does make sense to keep the interface for varM_real the same as that of varM_integer.
- 23 Nov 2022 21:44
- Forum: Visual Prolog
- Topic: Tiny feature suggestion for next VP version
- Replies: 3
- Views: 428
Tiny feature suggestion for next VP version
varM_real (as a variant of varM_integer) seems like something that would be commonly used and would be trivial to implement. I use a construct like that frequently in reports for totally & subtotalling.
Of course, both inc() and dec() make little sense for reals.
Of course, both inc() and dec() make little sense for reals.
- 21 Nov 2022 21:31
- Forum: Visual Prolog
- Topic: SciLexer tab key - line indent vs. tab insert
- Replies: 16
- Views: 1420
Re: SciLexer tab key - line indent vs. tab insert
Boom! That's the sound of my brain exploding after seeing a new (to me) way of doing things.
Thanks, Gukalov!

Thanks, Gukalov!