Global constants cannot be assigned non-printing characters such as carriage
return, horizontal tab, etc. The obvious solution is to simply create local
constants where you need them but that's reinventing the wheel every time.
Fortunately, there is a more elegant solution.
In a module, add functions that return the various characters you require.
Here are examples of functions that return carriage return, horizontal tab
and space:
Function CR ( ) as string
return chr(13) 'carriage return
End Function
Function HT ( ) as string
return chr(9) 'tab
End Function
Function SP ( ) as string
return chr(32) 'space
End Function
This tip was provided by Philip Heycock.
--
Geoff Perlman
President and CEO
REAL Software, Inc.
512-328-7325 x711 (voice)
512-328-7372 (fax)
- - - - - - - - - -
Got a useful tip to share? Send it to us at:
<REALbasic-tips at lists dot realsoftware dot com>.
To unsubscribe from the Tips list, send an email to
<mailto:realbasic-tips-off at lists dot realsoftware dot com>
|