[futurebasic] Re: [FB] FB^3 conversion questions

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

From: AlStaff@...
Date: Thu, 30 Sep 1999 09:11:07 EDT
>1. CHARWIDTH is a toolbox function that returns an integer and worked
>under FB II. Fontwidth% is dimmed in the local function. I have tried
>enclosing S in quaotation markes and putting S in a variable but
>nothing works. I checked with Inside Macintosh at Apple and I don't
>think the toolbox call changed.
>
>Error: String used when a Number was expected.
>Fontwidth%=FN CHARWIDTH(S)


FN CHARWIDTH is looking for the ASCII number. It would be 83 for "S".
Fontwidth%=FN CHARWIDTH(83)

You could use FN STRINGWIDTH to check a string length.
Fontwidth% = FN STRINGWIDTH("S")

Both of those methods will give the same result and worked for me in FBII and 
FB^3.


Al Staffieri Jr.

AlStaff@...
http://members.aol.com/AlStaff/index.html