To answer the question about printing the output three times from within my function. I think we found a KiXtart bug.

Kholm, suggested that I remove the exit at the end of the function to save four strokes. I did that without testing because he and I thought when the execution hit the ENDFUNCTION statement the function would exit automatically. WRONG! I think that using the GOTO (Yuk!) inside the nested loops causes a problem. The GOTO seems to behaving like a "GOSUB" statement and the ENDFUNCTION like a "RETURN". Without the exist statement in the code, execution returns to the GOTO and the FOR loops continue processing. When the loops were finished processing the value of $Game24 is set to "".

So your program was correct in the strange output since it received strange output.
code:
Game24 v 1.1 KiXtart Golf running under KiXtart v4.11

In: 3388; Out: 8.0/(3.0-8.0/3.0) = 24 => Correct!!
In: 1234; Out: (1.0+2.0+3.0)*4.0 = 24 => Correct!!
In: 2268; Out: (2.0+6.0)+(8.0*2.0) = 24 => Correct!!
In: 4466; Out: = => Correct!!
In: 0965; Out: (0.0-6.0)*(5.0-9.0) = 24 => Correct!!
In: 3164; Out: 6.0/(1.0-3.0/4.0) = 24 => Correct!!
In: 7395; Out: (7.0+3.0)+(9.0+5.0) = 24 => Correct!!
In: 1955; Out: (1.0+5.0)*(9.0-5.0) = 24 => Correct!!
In: 6396; Out: (6.0+3.0)+(9.0+6.0) = 24 => Correct!!
In: 4736; Out: = => Correct!!
In: 9439; Out: (9.0*4.0)-(3.0+9.0) = 24 => Correct!!
In: 4478; Out: (4.0+4.0*7.0)-8.0 = 24 => Correct!!
In: 1254; Out: (5.0-1.0)*(4.0+2.0) = 24 => Correct!!
In: 0714; Out: (0.0+7.0-1.0)*4.0 = 24 => Correct!!
In: 2000; Out: = => Correct!!
In: 9196; Out: (9.0+1.0*9.0)+6.0 = 24 => Correct!!
In: 0200; Out: = => Correct!!
In: 7547; Out: (7.0*5.0)-(4.0+7.0) = 24 => Correct!!
In: 4270; Out: = => Correct!!
In: 4362; Out: (4.0+3.0*6.0)+2.0 = 24 => Correct!!
In: 3778; Out: (3.0+7.0-7.0)*8.0 = 24 => Correct!!
In: 2476; Out: (2.0+4.0*7.0)-6.0 = 24 => Correct!!
In: 8624; Out: (8.0+6.0*2.0)+4.0 = 24 => Correct!!
In: 7564; Out: (7.0+5.0-6.0)*4.0 = 24 => Correct!!
In: 3477; Out: (3.0+4.0*7.0)-7.0 = 24 => Correct!!
In: 1289; Out: (8.0*9.0)/(2.0+1.0) = 24 => Correct!!
In: 3377; Out: (3.0+3.0/7.0)*7.0 = 24 => Correct!!

kix32 Kixgolf3.kix $f=junk.kix

KixGolf score = 438



[ 24. September 2002, 12:24: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/