I am having trouble with mod/rem don't work correctly for numbers higher than 238.
e.g. Modulo5 = 239 mod 5
fails.
Shall I use functions from different class?
Search found 73 matches
- 3 Mar 2018 12:37
- Forum: Visual Prolog
- Topic: the operators rem and mod don't function correctly after 238 operand
- Replies: 1
- Views: 2920
- 2 Mar 2018 21:36
- Forum: Visual Prolog
- Topic: redefine logStream := outputStream_file::create("log.txt"), for many different files
- Replies: 1
- Views: 3017
redefine logStream := outputStream_file::create("log.txt"), for many different files
Is it possible to reassign the logStream variable as above, to arbitrary number of many different log files,
in the same VP8 project?
e.g. log.txt, log1.txt, code1.ada, code2.vhdl, etc.
I have the impression that VP8 forbides this. Is it true?
in the same VP8 project?
e.g. log.txt, log1.txt, code1.ada, code2.vhdl, etc.
I have the impression that VP8 forbides this. Is it true?
- 2 Mar 2018 17:56
- Forum: Visual Prolog
- Topic: linker errors: symbol redefinition in file ...
- Replies: 7
- Views: 4951
Re: linker errors: symbol redefinition in file ...
I am using commercial 8 edition
- 2 Mar 2018 17:52
- Forum: Visual Prolog
- Topic: linker errors: symbol redefinition in file ...
- Replies: 7
- Views: 4951
Re: linker errors: symbol redefinition in file ...
how do I remove monitor class log ?
can you point it out because I cannot see it anywhere in the project.
Michael
can you point it out because I cannot see it anywhere in the project.
Michael
- 2 Mar 2018 14:08
- Forum: Visual Prolog
- Topic: linker errors: symbol redefinition in file ...
- Replies: 7
- Views: 4951
Re: linker errors: symbol redefinition in file ...
All I 've done is adding the following: monitor class log properties logStream : outputStream. predicates write : (...). end class log in my main.pro file and have the following in the main.pack: #include @"main.ph" % privately used packages #include @"pfc\stream\outputStreamSupport\o...
- 2 Mar 2018 12:11
- Forum: Visual Prolog
- Topic: linker errors: symbol redefinition in file ...
- Replies: 7
- Views: 4951
linker errors: symbol redefinition in file ...
Hello, I get a lot of link errors like " symbol redefinition in file ..." and although the project compiles I cannot build it. Can anybody help? sample: Type Action Description Filename Path e2528 Error 2528: 'Symbol redefinition in file 'Obj\main.789E136F.obj': '?newEx$@outputStreamSuppor...
- 20 Feb 2018 18:32
- Forum: Visual Prolog
- Topic: VP Debugger: How to set specific number of BreakPoint iterations
- Replies: 4
- Views: 4288
Re: VP Debugger: How to set specific number of BreakPoint iterations
my problem is rather more specific.
I want to repeat a certain times on a breakpoint, without pressing all the time the key.
Just imagine a breakpoint, that I want to examine only its 1000 and 100000th time of occurence,
without having to click or press the key 1000 and 100000 times!
I want to repeat a certain times on a breakpoint, without pressing all the time the key.
Just imagine a breakpoint, that I want to examine only its 1000 and 100000th time of occurence,
without having to click or press the key 1000 and 100000 times!
- 19 Feb 2018 18:10
- Forum: Visual Prolog
- Topic: VP Debugger: How to set specific number of BreakPoint iterations
- Replies: 4
- Views: 4288
VP Debugger: How to set specific number of BreakPoint iterations
Does anybody know how to set specific number of breakpoint iterations for the debugger to stop at?
E.g. using the getBPcount() or other relevant functions?
Can you give me an example?
E.g. using the getBPcount() or other relevant functions?
Can you give me an example?
- 17 Jan 2018 8:33
- Forum: Visual Prolog
- Topic: modifying the foreach variable from within the foreach body
- Replies: 7
- Views: 4955
Re: modifying the foreach variable from within the foreach body
I know how to do recursion, thank you.
The problem with recursion is that it eats up the whole of my stack.
The problem is not with tail-recursive predicates, but with others
that call each other thousands of times...
b.r. Michael
The problem with recursion is that it eats up the whole of my stack.
The problem is not with tail-recursive predicates, but with others
that call each other thousands of times...
b.r. Michael
- 16 Jan 2018 17:12
- Forum: Visual Prolog
- Topic: modifying the foreach variable from within the foreach body
- Replies: 7
- Views: 4955
modifying the foreach variable from within the foreach body
Hello,
is there any way to modify the foreach variable from within the foreach body?
e.g.
I need to re-start the loop with different begin and end values, and I cannot
implement this without recursion.
Michael
is there any way to modify the foreach variable from within the foreach body?
e.g.
Code: Select all
foreach Y = std::fromTo(1, 100) do
<command to change the value of Y>
implement this without recursion.
Michael
- 3 Jan 2018 15:26
- Forum: Visual Prolog
- Topic: how can I declare and have my goal to be a (non-)determ instead of procedure
- Replies: 1
- Views: 2629
how can I declare and have my goal to be a (non-)determ instead of procedure
Because I have a lot of trouble with some nondeterministic calls from inside my project's goal, how can I declare and have my goal to be a (non-)determ instead of a procedure, as it is declared now (and I don't know where it is declared as such)? If I don't have procedure type on my goal the VP8 com...
- 3 Jan 2018 10:15
- Forum: Visual Prolog
- Topic: how to avoid increasing the stack for facts matching that fails
- Replies: 8
- Views: 5120
Re: how to avoid increasing the stack for facts matching that fails
Thank you for your answer. Does the new VP support loops? what about global variables? (I recall seeing in some example a foreach command...). I could then store the sequence number of the fact in the loop index or the global variable, instead of iterate around predicate calls. Of course this will r...
- 3 Jan 2018 9:30
- Forum: Visual Prolog
- Topic: how to avoid increasing the stack for facts matching that fails
- Replies: 8
- Views: 5120
Re: how to avoid increasing the stack for facts matching that fails
OK so you confirmed what I already know about the stack, thank you. Actually, the strategy that I had followed in this project is that the algorithm goes through a fact sequence, beginning with the #1, and at every step a new predicate is called that process the next boung of facts and so on. This p...
- 2 Jan 2018 18:31
- Forum: Visual Prolog
- Topic: how to avoid increasing the stack for facts matching that fails
- Replies: 8
- Views: 5120
Re: how to avoid increasing the stack for facts matching that fails
Thank all for feedback.
Dear Thomas, can please list to me all the cases that the stack increases (I know about the recursion already),
so that I have a clear picture, since I couldn't find this in the documentation.
thanks and Happy New Year,
Michael
Dear Thomas, can please list to me all the cases that the stack increases (I know about the recursion already),
so that I have a clear picture, since I couldn't find this in the documentation.
thanks and Happy New Year,
Michael
- 29 Dec 2017 7:11
- Forum: Visual Prolog
- Topic: how to avoid increasing the stack for facts matching that fails
- Replies: 8
- Views: 5120
how to avoid increasing the stack for facts matching that fails
hello, I have the following clause: add_local_conditionally(Module_name, In_local_list, In_local_entry, Out_list, Last_entry) :- local_object(local_OBJECT(Module_name, In_local_entry, _, Object_name, _, _, _, _, _)), Next_local_entry = In_local_entry + 1, hierarchy_PART(1, Top_package_module, 0, _, ...