Page 1 of 1

include file

Posted: Sat Jun 16, 2007 6:08 pm
by PaPi
My program:

`test_include.bas
include "include1.bas" `  to be out of work. Why?
dim a as single
a=123.456
print int(a)
print sample(a)
sleep 3000


and the include file:


`include1.bas
function sample(x as single) as single
     result=x+x/2+x/3
end function

include file

Posted: Sun Jun 17, 2007 9:42 pm
by Marco
Hi think I was sleeping but it is a bug I fixed it.
You can download the new compiler at the file section of this forum.
Kind regards

include file

Posted: Tue Jun 19, 2007 6:06 pm
by PaPi
Hi, I have now the new fnxcompiler. Bat, there are an other error.
The file fnx.log:

FNXBasic   compiler     (C) Marco Waterman 2006
error:12 line:2 Variable result not declared
done

(The program is in the first post in topic...)
PaPi

include file

Posted: Tue Jun 19, 2007 9:44 pm
by Marco
Hi I have replaced the file in the file section with one that works,
there was something wrong with the prescan (to declare subs and functions before they were called).
I did tested it with your code and it seems to work now.
So you can download it again from the file section.
Let me know if it works.
Kind regards marco

include file

Posted: Wed Jun 20, 2007 8:16 am
by PaPi
Thanks, is fine now, with the new file.
PaPi