[comp.sys.handhelds] EDIT/VISIT syseval or address needed

bruceb@telesoft.com (Bruce Bergman @nova) (01/15/91)

Recently, a couple of folks have asked for the syseval or address for
the builtin EDIT/VISIT routine.  I find myself now interested in that
also, as I've started writing a simple-minded text manager.  It would
be a lot smaller and easier to just shove a string in to be edited than
to do it manually, so if anyone knows how to programatically invoke
EDIT or VISIT, I'd really like to know.

Also, I needed to convert a string into a global name object, and after
a little experimentation, I came upon the following code to do that.
It seems there ought to be an easier way -- does anyone know of an
easier method of doing this type of conversion?

   "string"  -->  'string'   (when a variable exists called string)

   << "'" SWAP + "'" + OBJ-> >>

       (Normally one could just do an OBJ->, but if a variable in
        the current directory exists called 'string', then the double
        quoted version is resolved down to the contents of the variable.
        I don't want that; I want just the global name object.)

Thanks much!

bruce
-- 
att!   \   crash!--\            TeleSoft (bruceb@telesoft.com)
ncr-sd! \           \           5959 Cornerstone Court West
         >--ucsd!---->--telesoft!bruceb (Bruce Bergman N7HAW)
nosc!   /           /           San Diego, CA.  92121-9891
ucbvax!/   uunet!--/            (619) 457-2700 x123
All opinions are my own.    Have you hugged your horse lately?

akcs.dnickel@hpcvbbs.UUCP (Derek S. Nickel) (01/16/91)

Bruce,

Yes, there is a SYSEVAL to convert Strings to Global Names.  I don't have
my list with me, though.  I'll post it later, if know one beats me to it
:-)

        Derek S. Nickel

akcs.joehorn@hpcvbbs.UUCP (Joseph K. Horn) (01/16/91)

Bruce & Derek: #5B15 SYSEVAL converts a string to a global name.  This
info is from your address comment file, Derek.  [jkh]

kskalb@faui1f.informatik.uni-erlangen.de (Klaus Kalb) (01/16/91)

bruceb@telesoft.com (Bruce Bergman @nova) writes:
>Also, I needed to convert a string into a global name object, and after
>a little experimentation, I came upon the following code to do that.
>It seems there ought to be an easier way -- does anyone know of an
>easier method of doing this type of conversion?

>   "string"  -->  'string'   (when a variable exists called string)

Try #05B15h SYSEVAL.
I've found that in the hidden directory stuff, as far as I remember.

>   << "'" SWAP + "'" + OBJ-> >>

Be careful, the SYSEVAL will work on illegal strings (name of build-in 
commands, bad formed formulae,...) as well.

>Thanks much!

Have Fun,
-KK

john%solvint@orstcs.UUCP (01/17/91)

> Recently, a couple of folks have asked for the syseval or address for
> the builtin EDIT/VISIT routine.  I find myself now interested in that
> also, as I've started writing a simple-minded text manager.  It would
> be a lot smaller and easier to just shove a string in to be edited than
> to do it manually, so if anyone knows how to programatically invoke
> EDIT or VISIT, I'd really like to know.
> 

The purpose of the INPUT command is to accomplish this in a program.
Something along the lines of:

<obj> "EDIT mode" { 1 1 V } ROT \->STR + INPUT OBJ\->

or something like it will accomplish what you are after.

> Also, I needed to convert a string into a global name object, and after
> a little experimentation, I came upon the following code to do that.
> It seems there ought to be an easier way -- does anyone know of an
> easier method of doing this type of conversion?
> 
>    "string"  -->  'string'   (when a variable exists called string)
> 
>    << "'" SWAP + "'" + OBJ-> >>
> 

With only slight modification, this is indeed the way to accomplish what
you are after.

        "'" SWAP + OBJ\->

is all that's required, since the parser is intelligent and will assume
the final "'".  An easier way?  What could be easier than that?

> 
> Thanks much!
> 
> bruce


--
John W. Loux                    | Solve and Integrate Corp
solvint!john@orstcs.cs.orst.edu | PO Box 1928
john@solvint.uucp               | Corvallis, OR 97339-1928
                                | (503) 754-1207

caster@jove.cs.pdx.edu (Brad J. Caster) (02/03/91)

In article <2793c5db:1718.2comp.sys.handhelds;1@hpcvbbs.UUCP> you write:
>Bruce & Derek: #5B15 SYSEVAL converts a string to a global name.  This
>info is from your address comment file, Derek.  [jkh]




Warning!:  Don't try this with a non-string.  (Memory Lost)