[futurebasic] Re: [FB] FBtoC conversion tricks

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

From: Brian Stevens <bstevens33@...>
Date: Mon, 4 Feb 2008 21:50:43 -0700
William,

Please submit a code snippet that RUNS. This doesn't compile and  
either me or someone else (like RP) would need to spend a lot of time  
guessing what all the undeclared constants and such are. Since you  
know which statements fail, please send a snippet that fails. You've  
undoubtedly seen what has been posted recently to reproduce problems.  
Use those examples as your model.

Thanks....

Brian S.

On Feb 4, 2008, at 9:10 PM, William Levering wrote:

> RP - I'll save you some time looking at my code for the val/val&  
> differences.  The indented lines are the lines that a VAL&() must  
> be used (6 lines).  And below this code is another error (fatal)  
> that I get if I don't use VAL&.
>
> Local fn EditChartInfoDiag(evnt)
> dim buttn
> dim waswidth,washeight
>
> select evnt
> CASE _btnClick
> buttn=DIALOG(1)
> SELECT buttn
> case <=Chart.chartwidth%
> if button(buttn)>1 then button buttn,1 else button buttn,2
> CASE 100'done
> 'must call in this order!!!
> if edit$(1)<>filerec.name$ then filerec.name$=left$(edit$(1),63):inc 
> (CModify)
> for buttn=1 to Chart.chartwidth%
> long if Chart.boldline%[buttn]+1<>button(buttn)
> if button(buttn)=2 then Chart.boldline%[buttn]=1 else Chart.boldline 
> %[buttn]=0
> inc(CModify)
> end if
> next
> for buttn=1 to Chart.chartheight%
>       long if Chart.linenumb%[buttn]<>val&(edit$(20+buttn))
> Chart.linenumb%[buttn]=val(edit$(20+buttn))
> inc(CModify)
> end if
> next
>      if val&(edit$(2))<>Chart.chartwidth%  then Chart.chartwidth%  
> =val(edit$(2)):inc(CModify)
>      if val&(edit$(3))<>Chart.chartheight% then Chart.chartheight% 
> =val(edit$(3)):inc(CModify)
>      if val&(edit$(4))<>Chart.textheight% then Chart.textheight%=val 
> (edit$(4)):inc(CModify)
> 'if symbol height or width changes
> waswidth=Chart.symbwidth%
> washeight=Chart.symbheight%
>      if val&(edit$(6))<>Chart.symbwidth%   then Chart.symbwidth%   
> =val(edit$(6)):inc(CModify)
>      if val&(edit$(7))<>Chart.symbheight%  then Chart.symbheight%  
> =val(edit$(7)):inc(CModify)
> long if waswidth<>Chart.symbwidth% or washeight<>Chart.symbheight 
> %'symbol hight or width changed
> fn AdjustSymbolSize(waswidth,washeight,Chart.symbwidth 
> %,Chart.symbheight%)
> end if
> fn MenuMod
> closewndevent=_editchartInfoWnd
> case 101'cancel
> closewndevent=_editchartInfoWnd
> END SELECT
> CASE _wndClose'same as cancel
> closewndevent=_editchartInfoWnd
> end select
> end fn
>
> ------fatal error below ------
>
> _7_ChartSymbol.c: In function 'ReorderSymbDiag':
> /Users/williaml/Home/Apps stuff/Basic Apps/Charting folder/Charting  
> project-FBtoC/build_temp/_7_ChartSymbol.c:374: error: array  
> subscript is not an integer
>
> Chart.sname$[arrayoffset+val&(edit$(x))]=Chart.sname$[x] -  this  
> works!
> Chart.keyword$[arrayoffset+val(edit$(x))]=Chart.keyword$[x] - this  
> does NOT work!
>
> WilliamL
>
> --
> To unsubscribe, send ANY message to: futurebasic- 
> unsubscribe@...
>

Brian S.