June 16, 20169 yr I have a Calculation field (in FMPro 12) that includes the following: Char ( 21 ) & Char ( 22 ) & Char ( 97) [note: Calculation result is set as "Text"] I had expected the result of this calculation to be !"a but instead it is 2 blank spaces and a Can somebody explain why the result doesn't include ! and "
June 16, 20169 yr 17 minutes ago, philipcaplan said: I had expected the result of this calculation to be !"a Perhaps you think that the Char() function takes a hexadecimal number as its argument. It doesn't. The argument is a decimal number - so in order to get an exclamation mark, you need to use Char ( 33 ), and Char ( 34 ) for a quotation mark. Strangely enough, you have used the correct Char ( 97 ) to get an "a" and not Char ( 61 ) as would be consistent with your logic. BTW, the two characters you have received are not spaces, but control characters.
Create an account or sign in to comment