[futurebasic] FBtoC conversion tricks

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2008 : Group Archive : Group : All Groups

From: William Levering <vering2@...>
Date: Mon, 04 Feb 2008 17:01:26 -0800
I have been trying to convert several simple programs from FB4 to  
FBtoC... without much luck.

These are the tricks I have found to clear up some errors.  I don't  
know why these work (or how), I'm just passing along what I have  
discovered.

1) Anything in a DIM statement after a string declaration will be  
ignored.  This doesn't give an error but will cause problems.
      - e.g. Dim x,y,z,a$,b,c   ( b and c will be ignored)

2) If a val() is used in an array it gives an '==' comparison error.   
The fix is to use val&() everywhere.
      - e.g. MyArray(val(edit$(1)) won't work but MyArray(val&(edit 
$(1))) will work

3) INC(Record.field) won't and DEC doesn't either.  Maybe other things  
won't inc and dec either but I haven't that pop up yet.
       -e.g. INC(Record.field) won't work but Record.field=Record.field 
+1 will

4) If I get an _evCM@#$%  comparison error in a header file (some  
constant like that) it means there is an error somewhere else.  I'm  
resisting looking for errors in the header... like I have any idea  
what is going on there!?!?

5) Every instance of Picture,Mypict gives me a 'incompatible pointer  
type' and this includes Kill Pict, Picture On, Picture Off, etc.  This  
has been mentioned before but the fix hasn't been offered.  Tried Dim  
as 'Pointer MyPict' and 'Dim as Handle MyPict' but nothing helps.  The  
error (warning actually) doesn't seem to be a problem.

6) In every conversion the window I open is blank until I close and  
open the window again.  I dunno if this a refresh problem.  I get the  
same thing with print statements.  I don't even know how to describe  
this problem.

7)  I get a -  syntax error after ','  - error and found it could be  
cleared up by not putting anything after TEXT _geneva, 9 on the line  
of code.
    - e.g.   Text _geneva,9:z=1 will give that error

Well, these are the work-arounds I've found so far.  I'm hoping others  
can offer more so that I can get a little further in converting my  
code.  So far, with no errors other than the 'incompatible pointer'  
warning, I get some buttons in a row that show up as edit fields, and  
blank edit fields other places, and blank windows.  I haven't even  
tried events yet...

WilliamL