I am in need of help finding the number of elements in a str# resource.
According to the FBII manual (p. 206) this FN should return the number of
elements in totStr%:
LOCAL FN getStrs (id)
DEFSTR LONG
strHndl&=FN GETRESOURCE(_"STR#", id)
LONG IF strHndl&
size& = FN SIZERESOURCE(strHndl&)
totStr% = ([strHndl&])
CLEAR size&
FOR j = 1 TO totStr%
INDEX$(j-1) = STR#(id, j)
NEXT j
XELSE
totStr% = 0
END IF
END FN
but I get a 5-digit number when this FN is run as is. Changing it to:
totStr% = ({strHndl&})
to peek WORD instead of LONG produces a 3 digit number (There are 3
elements in my str#)
What is the correct way to determine number of elements?
TIA
Roger M. Clary
MacMuse Software
macmuse@...
http://members.aol.com/macmuse