Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!bmc!kuling!crwth From: crwth@kuling.UUCP (Olle Gallmo) Newsgroups: comp.sys.handhelds Subject: UP (was Copyright stuff...) Message-ID: <1240@kuling.UUCP> Date: 13 Nov 89 13:14:03 GMT References: <8618@microsoft.UUCP> Organization: DoCS, Uppsala University, Sweden Lines: 32 From article <8618@microsoft.UUCP>, by alonzo@microsoft.UUCP (Alonzo Gariepy): > LEVAL [9FCA] > << { } + #C784h SYSEVAL >> > > So CD is just LEVAL and the program to go up a directory is: > > UP [44B5] > << PATH 1 OVER SIZE OVER - SUB LEVAL >> > > or, faster still: > > UP [8FCA] > << PATH 1 OVER SIZE OVER - SUB #C784h SYSEVAL >> > Very nice, but isn't it a little bit awkward to traverse the whole path, just to go one step upwards? Why not do it like this? UP << PATH DUP SIZE 1 - GET EVAL >> It won't work if the current directory has a child with the same name as the parent to the current directory or if the current directory is the home directory (has no parent), but that doesn't matter in my opinion. /Crwth ---- "If God is perfect -- why did He create discontinous functions?" ---- Olle Gallmo (Crwth) Email: crwth@kuling.DoCS.UU.SE Real: Arstagatan 45, 754 34 Uppsala, Sweden