Re: A86: Personal Intro & Questions (fwd)


[Prev][Next][Index][Thread]

Re: A86: Personal Intro & Questions (fwd)




Dux Gregis wrote:

> You were wrong about the variables being copied to "$" whatever it is.
> The variable name ("$",xx is treated as a variable that contains string
> and equation parameters) is in op1 and is somehow looped over (maybe
> Pat's eos loop?).  That's why when you type 4 parameters into an empty
> function, it only returns the last one as the result.  If you happen to
> know the variable name (like if it's "$"), then you can look it up in
> the VAT, but this, however, doen't allow for you to use variables and
> strings interchangeably.  You should be able to read from op1 and not
> have to copy data there.

I think that it only makes the $xx vars when you pass a literal (and maybe just for
strings, matrices, and whatever else - not sure, but it really doesn't matter).  What I'm
saying is that each parameter is pushed onto the stack.  If it is a real, the value is
pushed; if it is a non-real type, the variable name is pushed.  I am going to test this
today.

> If you've got an explantion of Pat's doc I'd sure like to see it!  :-)
> What does he mean by some of the things like "display conversion tokens"
> and "eos loop"?

I don't have one :-)

> > You could easily define vars of your own types.  However, you'd have a hard time
> > accessing them because they don't show up in any menus, etc.  You could, however,
> > make a program that either hacks a menu and adds a "customtype|names" menu
> > somewhere (mem|delete, custom menu, etc...)  however, you'd have to overload all
> > the built-in tokens and that wouldn't be fun at all!
>
> How would you get the calc to recognize a new type in the VAT?

By overriding the parser, you could have it search the new type for any variable names,
and then maybe call different commands if the new type was used (i.e. a different add
routine, etc...) but like i said that would be a real mess.  I was planning on making my
own variable type later on when i make some (many) more advanced with my HP program...
That way, the regular OS could not access them and (a) mess itself up or (b) mess up the
program's data...  This (if i ever get this far) is a long way off, tho, and the regular
os would still not recognize them...

--
Stephen Hicks
mailto:shicks@mindspring.com
ICQ:5453914
IRC/AIM:Kupopo
Hopemage:http://www.mindspring.com/~shicks/



Follow-Ups: References: