[S] ASCII characters in script files - more details

Karen_Johnson@bdhq.bd.com
Wed, 11 Nov 1998 15:07:56 -0500


I have received several questions about using ASCII characters in
script files. I checked ALT 224:248 and 253, which contains the
Greek and math symbols. The results were irregular, with more
not working than working.

Beta works but alpha doesn't (??). Following are the steps to
show the ones that worked on my machine.
File - New - Script File
Type the following lines in the script file:
plot(0:10, 0:10, type='n', main="ASCII Trial", cex=1.5,
xlab='', xaxt='n', ylab='', yaxt='n')
key(5, 5, corner=c(0.5, 0.5), cex=2,
text=c('', '', '', '', ''),
text=c(225, 230, 241, 248, 253),
text=c('beta', 'mu', 'plus or minus', 'degree',
'superscript 2'))
3. Execute the script file.

To create the character hold down the ALT key and use the
number keypad to type the numbers. (It does *not* work using
the numbers at the top of the QWERTY keyboard. This is also
true everywhere, not just S+.)

The list of characters I have was published in PC Magazine
(Volume 6, Number 18, October 27, 1987).

I would appreciate insight as why some work and others don't as
this could lead to a truly useful solution.
Sorry to post prematurely,
KJJ

<< Orginal Post >>
Good Luck,
I run S+ 4.5 from on Windows NT. I stumbled on an unexpected
benefit that others might find useful.

When creating plots from a script file you can use the standard
shortcuts for ASCII characters to include the characters in text
strings for titles and such. For example ALT224 gives an alpha
character that looks like alpha in the script file and on the
plot. This is a simple way to incorporate greek letters and math
sybols (such as "plus or minus" and "equal to or less than").

I don't understand why this works from a script file when it
never has and still doesn't work from the command line.
Nevertheless, I'm glad it works.

KJJ

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news