The Difference Between CONTEXT and STOPSIGN by Joe Horn mte@delphi.com (Todd) writes: > Whether or not I see the problem [of commands not getting resolved > when typed on the keyboard] on my rev. P depends on how I enter the > hidden directory. If I do # 640BEh SYSEVAL, then I have the same > problem. Typing MEM in the command line puts the global 'MEM' on the > stack, but entering MEM from its menu produces the correct response. > Also, if I try to recall variables in the HOME directory, I get the > error that the variables are undefined. If I do an ON+C and HOME # > 15781h SYSEVAL, then I have none of the problems unless I start > using the entry at # 640BEh (SetHiddenRes). I do not, however, > understand what it is about the entry at # 640BEh that causes the > problem. My solution is to simply not use the enrty at # 640BEh. > Please respond if this helps The problem with # 640BEh is that it not only sets the context (which is what you wanted) but also the "stopsign" (the limit of command resolution, which you did *not* want to do). The "stopsign" is always a directory, pointed to by the address stored at location #705A1 on the S/SX, and #80720 on the G/GX. The operating system is constantly changing the stopsign to prevent conflicts. Suppose, for example, that the system tries to recall a variable from the hidden directory, but it does not exist there, yet *does* exist in the home directory. The "wrong" variable would be recalled. To prevent this, the stopsign is set to the hidden directory, to limit variable resolution to that directory alone. Of course, the system immediately afterwards resets the stopsign to the home directory. What you unintentionally did was set the stopsign to the hidden directory and then left it there. Typing #08DC4h SYSEVAL would have reset your stopsign (and keyboard command resolution) to normal, without affecting anything else. Here are some related System RPL words: * 640BE SetHiddenRes sets context and stopsign to hidden dir * 15777 NULLID puts null name on stack 15781 (unnamed) sets context to hidden dir 08DC4 SYSSTOPSIGN sets stopsign to home dir * 08D92 SYSCONTEXT sets context to home dir * 08D92 HOMEDIR (another name for SYSCONTEXT) * 08D08 CONTEXT! 1:dir --> (sets context to dir) 08D4A STOPSIGN! 1:dir --> (sets stopsign to dir) * 08D5A CONTEXT@ --> context dir 08D82 STOPSIGN@ --> stopsign dir * Asterisk means "supported". The others have not moved in revs A through R, but there are no guarantees, etc etc. Playing around with the stopsign is relatively harmless (famous last words!) because as you noticed you can still launch commands from the menus and key assignments. PROGRAMMING PROBLEM: Good programmers shy away from OBJ-> on user-input strings because there's no telling what the fool will key in, like "CLVAR", which would nuke all your variables when you OBJ-> it. ELEGANT SOLUTION: Set the "stopsign" to the current subdirectory (CONTEXT@ STOPSIGN!) and then you can OBJ-> practically anything without fear. Of course, be sure to do a SYSSTOPSIGN immediately after the OBJ-> to return the HP48 to normal. Hope this helps. +------------------+ | -Joseph K. Horn- | | jaykaye@kbbs.com | +------------------+