[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 18:52:39 -0700
On Feb 4, 2008, at 6:01 PM, William Levering wrote:

>
> 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

Works fine here with val.  BTW: val& is limited to integers, so it  
isn't a good work around.
Same request as before. Please submit a short code sample that  
reproduces the problem.  I'm sure you are seeing a problem, but based  
on this testing your diagnosis is incorrect. Maybe send the FBtoC log  
with the error and the FB code that corresponds to the it.

'-------
dim as short     myArray(2)
dim as str15     s
dim as rect      r

SetRect( r, 0, 0, 480, 340 )
appearance window 1, "Edit$ Test", @r, _kDocumentWindowClass,  
_kWindowCompositingAttribute

SetRect( r, 200, 20, 460, 150 )
edit field 1, "_framed", @r, _framed, _centerJust


edit$(1) = "2"

myArray(val(edit$(1))) = 42

print myArray(2)

do
handleevents
until gFBquit
'-------------



Brian S.