|Re: Editor on Mac or PC for 50g programs|
Message #2 Posted by James M. Prange (Michigan) on 25 Sept 2007, 10:33 p.m.,
in response to message #1 by Miguel Reznicek
Well, I simply use my favourite text editor,
What do you all use to edit and prepare programs for the 50g when doing so on an Win XP driven PC?
I normally use translation mode 3, which can be set by doing 3
TRANSIO, or by editing the last element in IOPAR to 3, or by
choosing Xlat:CHR 128-255 in an input form.
Of course you could use a different translation mode, but
depending on the character set in use, it may be difficult to read
some non-ASCII characters, and somewhat of a pain to enter them.
I don't have any experience with a Mac, but any text editor should
be okay; even MS Notepad will work in a pinch. Just use whichever
one you prefer. Even a "word processor", such as MS Word or
WordPerfect, should work, as long as the files are saved as plain
text, to avoid having the word processor's control codes or escape
sequences stored in the file.
Does anyone use a Mac with OS X for this? I was thinking a text
editor like BBEdit,
Using an ordinary text editor means that you have to learn some
translation sequences for non-ASCII character, but I expect that
the ones that you frequently use will be easy to remember. For a
User-RPL program that builds a character string that looks like a
translation table for characters 128-255, you could use the
@ For 49G, 49g+, 48gII, or 50g only.
@ Checksum: # A162h
@ Size: 116.5
# 2F34Eh SYSEVAL @ KVIS for 49 series.
+ + + + + + +
Or a faster SysRPL version is included with my "ASCII on SD"
Which characters are actually translated by the above program
depends on which translation mode is in effect when the program is
run. Of course, how the characters look depends on which font is
current when the string is viewed.
Of course, once the string is built, you could store it as a
global variable, so you wouldn't have to run the program again.
In addition, in modes 1-3, LineFeed codes are translated to
CarriageReturn-LineFeed pairs, and in modes 2 and 3, \ is
translated to \\.
Well, there's a minor problem with that. Any transfers between the
flash card and the calculator are "binary" transfers, so the
entire file contents would be stored within a character string
object, instead of being translated and compiled as the intended
object. For a work-around, see
then saving to the SD card, then into the 50g.
For some more general information, see my
The source code file should have an ASCII transfer header similar to:
This header tells the calculator, first, that it's to be treated
as an ASCII transfer, then the T() parameter tells it which
translation mode (0-3) to use, then the A() tells it which
angular mode, D for Degree, R for Radian, or G for Grad, and the
F() tells it which is the fraction mark, . for period or , for
comma. These parameters can be in any order, and if any parameters
are missing, then the current mode is used. A very minimal ASCII
transfer header would be:
This would tell the calculator that it's an ASCII transfer, but
whichever modes happened to be current would be used.
Unfortunately, the ASCII transfer header doesn't include any
information on whether a number without any fraction mark should
be treated as a "real number" or a zint (exact integer). In
general, if the source code was originally written for (or
transferred from) a 48 series, have the 49 series in "approximate"
mode, so that such numbers will be compiled as reals, or if the
source code was originally for the 49 series, have the 49 series
in "exact" mode, so that such numbers will be compiled as zints.
This also applies to "real arrays" and "symbolic matrices".
The calculator doesn't pay any attention to a file extension; it's
just part of the global name that will be used,
except that if you have the "fraction mark" set to
comma instead of period (dot), then the "dot" will be treated as a
separator instead of part of the name. So if you use the comma for
a fraction mark, it's best not to use any file extension, or if
you use the period as the fraction mark, use any valid file
extension that you like.
What file extension should be used?
Other than that, Conn4x can be set up to use a .hp extension for
files that it stores on the PC, and the .hp is removed before the
variables are stored on the calculator.
If you'd like to use a USB connection instead of a flash card, you
could try HPConnect
on a Mac with OS X 10.3 or later.
Comments? Ideas? Suggestions?
Just so they don't feel left out, any Linux users could try
A "special" (MS Windows) editor that many seem to like is
This editor uses a character set that matches the calculator's,
and if I recall correctly, you select a non-ASCII character with a
mouse click. I find it much easier to use my text editor and
simply type in any translation sequences, but I realize that
preferences do vary.
Edited: 27 Sept 2007, 7:18 a.m. after one or more responses were posted