Search found 26 matches

by kingchris
14 Dec 2015 4:12
Forum: Visual Prolog
Topic: OnPaint race condition
Replies: 4
Views: 4305

I only added that in later to see if it would help.

Anything else that might cause a problem

Thanks
by kingchris
13 Dec 2015 5:05
Forum: Visual Prolog
Topic: OnPaint race condition
Replies: 4
Views: 4305

OnPaint race condition

clauses assert_stuff1():- % 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 assert(mazeX( 1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[7,3,1,1,7])), assert(mazeX( 2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[1,1,2,2,1,1])), assert(mazeX( 3,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...
by kingchris
1 Dec 2015 15:50
Forum: Visual Prolog
Topic: Simple list head rest split syntax
Replies: 6
Views: 5053

No. I disagree. build_filename_db():- dir(CurrentDir), console::write("Processing Dir ",CurrentDir),console::nl(), extension(CurrentSearchExtension), CurrentFilename = directory::getFilesInDirectoryAndSub_nd(CurrentDir,CurrentSearchExtension), %console::write("Found Filename ",CurrentFilename),conso...
by kingchris
1 Dec 2015 4:39
Forum: Visual Prolog
Topic: Simple list head rest split syntax
Replies: 6
Views: 5053

True. That would work perfectly. I just wanted to highlight for myself that lists could be split across the equals/assigment barrier :D I recall copying some code a while back that did this but I misplaced the code and couldn't recall how to do it. Sometimes for debugging purposes its easier to show...
by kingchris
30 Nov 2015 17:04
Forum: Visual Prolog
Topic: Simple list head rest split syntax
Replies: 6
Views: 5053

For those of you who want the cliff notes. This worked for me class facts filename:(string,string,string,string,core::string_list). clauses somePred():- filename(CurrentName._._,_,Name_Parts_Str), [Head,_Rest] = Name_Parts_Str, console::write(CurrentName," ",Head),console::nl(). So simple when you k...
by kingchris
30 Nov 2015 4:19
Forum: Visual Prolog
Topic: Simple list head rest split syntax
Replies: 6
Views: 5053

Simple list head rest split syntax

If I retrieve a string-list from a fact is there a simple syntax-sugar way to split it into the typical head rest vars class facts filename:(string,string,string,string,core::string_list). clauses somePred():- filename(_._._,_,Name_Parts_Str), [Head,Rest] := Name_Parts_Str, % this is wrong but you g...
by kingchris
20 Jun 2014 6:38
Forum: Visual Prolog
Topic: Howto create and populate a real array
Replies: 2
Views: 1738

Thanks for the help. You have excellent suggestions. Just for question completeness. fann_train : (pointer Fann, pointer ArrayInput, positive SizeInput, pointer ArrayOutput, positive SizeOutput) The pointer ArrayOutput parameter is actually an input parameter to the neural net. I am learning neural ...
by kingchris
19 Jun 2014 13:36
Forum: Visual Prolog
Topic: Howto create and populate a real array
Replies: 2
Views: 1738

Howto create and populate a real array

I wish to interface with the fann library for neural nets. I have a class fact that holds the 784 real values that I wish to pass. Assume that I have added the 784 real values already to the list. class facts - test real_data: (real_list) nondeterm. This is the function that I want to call. Its 2nd ...
by kingchris
28 Apr 2014 10:41
Forum: Visual Prolog
Topic: Dynamic runtime predicate pointer binding
Replies: 3
Views: 1979

You are correct in your "wrong school" statements. But please note that I did say Psuedo Code at the top. I and many other people on this forum, I am sure, program in multiple languages from F#, C#, C, C++, assembler, VB, Pascal etc. so its all gets very confusing. The latest PDC Prolog has introduc...
by kingchris
28 Apr 2014 9:38
Forum: Visual Prolog
Topic: Dynamic runtime predicate pointer binding
Replies: 3
Views: 1979

Dynamic runtime predicate pointer binding

Pseudo Code. facts predicate_pointer : pointer(string). predicates doNothing:(string). writeToConsole:(string). app_init(). doLotsOfWork(). clauses app_init():- if (debug_condition=true()) predicate_pointer := writeToConsole() else predicate_pointer := doNothing() end if. doLotsOfWork():- repeat(), ...