include file

In this category you can exchange your programming questions and solutions.
Post Reply
PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

include file

Post: # 54Post PaPi
Sat Jun 16, 2007 6:08 pm

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

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

include file

Post: # 55Post Marco
Sun Jun 17, 2007 9:42 pm

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

PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

include file

Post: # 56Post PaPi
Tue Jun 19, 2007 6:06 pm

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

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

include file

Post: # 57Post Marco
Tue Jun 19, 2007 9:44 pm

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

PaPi
Posts: 114
Joined: Wed May 16, 2007 11:55 am

include file

Post: # 58Post PaPi
Wed Jun 20, 2007 8:16 am

Thanks, is fine now, with the new file.
PaPi

Post Reply