[futurebasic] Re: [FB] FB3 Hello Wnd help

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: "keller" <keller@...>
Date: Tue, 21 Sep 1999 14:47:08 -0500
>>> I recieved the following error when I tried to demo FB3 for my nephew.
>>>
>>> Error: Functions must be defined before using...
>>> In file Temp Project at line 87 in MAINACTIONS, Code=129740
>>> €FN pGbuild€(_HelloWindowWnd)
>>>
>>> I tried it several times and decided that possibly the fact that I had FB2
>>> on line might have been the problem but didn't have time to test it until
>>> now.  I stuffed FB2 with StuffIt! so it wouldn't pick up something like
>>> STAZextras for example.
>>>
>>> I still have the error.  I looked in the prefs and tried to see where the
>>> problem exists.
>>>
>>> So...
>>>
>>> the problem is with pGbuild....
>>>
>>> What is it I am overlooking?
>>>
>>> TIA
>>>
>>>
>>>
>>> Jim Mumaugh
>>
>>I had the same problem. It worked fine once I DEF FNed pGbuild at the
>>begining of my .MAIN file.
>>
>>Don't ask me why, I had to def fn my other FN's that I was calling from
>>outside their own INCL files.
>>
>>So add this line at the beginning but outside of the PG code area...
>>
>>DEF FN pGbuild(_HelloWindowWnd)
>
> If you had to use DEF FN on pGbuild, then the files in your project are out
> of order.
>
>
>
> Best,
>
> -STAZ  ~)~


Nope, they were in the right order in the project manager window the whole
time (my stuff
at the bottom), and later on I took the DEF FN out and it worked fine.

Oh, one other thing. In FB^3 have to DEF FN a function if I want to have it
call itself.

local fn a$(word$)
    letter$=fn a$(word$)
end fn=letter$

Something like this will tell me that I need to define the function before I
call it.

def fn a$(word$)
local fn a$(word$)
    letter$=fn a$(word$)
end fn=letter$

But something like this works. (no, my code did NOT put it in an infinite
loop like this)

Anders... ?o)