Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!silvert From: silvert@cs.dal.ca (Bill Silvert) Newsgroups: comp.sys.handhelds Subject: Re: strings on 48 Summary: Flag settings? Message-ID: <1991May13.144544.6606@cs.dal.ca> Date: 13 May 91 14:45:44 GMT References: <1991May11.213329.1322@cs.dal.ca> <22625@shlump.lkg.dec.com> Sender: silvert@cs.dal.ca.UUCP (Bill Silvert) Reply-To: silvert%biome@cs.dal.ca Distribution: na Organization: Habitat Ecology Div., Bedford Inst. of Oceanography Lines: 39 In article <22625@shlump.lkg.dec.com> edp@jareth.enet.dec.com (Eric Postpischil (Always mount a scratch monkey.)) writes: > >>Is there a way to store strings on the HP48SX without having the system >>possibly rewriting them? If I try to store "00-00" in a string variable >>the system stores "0-0". > >The 48 stores strings just fine. It sounds like you may be entering >'00-00' instead of "00-00". The former, using apostrophes, is an >algebraic object: zero minus zero. It is stored internally with tokens >that represent zero minus zero, and when it is displayed, zero is >displayed as 0. The latter is a string; it is stored character by >character. Use quotation marks for strings -- the quotation marks are >blue-shifted on the minus key. I appreciate all the comments I received by email and by Eric's posting. As a result I am even more mystified. I was indeed aware of the difference between single and double quotes, and inspection of the stack shows that indeed I was working with double quotes. However, after having done some other stuff with string manipulations last night, the handling of minus signs has changed, and I suspect that perhaps I changed a flag or something like that. I cannot recall the exact commands I used, but basically what happened was that I generated a string like "F1-00-0123" and stored it, but when I recalled it I got "F1-0-123". This was repeatable. I finally edited the strings to replace the - signs by _ and stored them that way. But I just went back, edited the strings by replacing _ with -, and the strings are OK. I do not recall exactly how I entered the strings originally. I think I just typed them in. But today when I try to type in a string like this the - sign gets interpreted as a command, so to include the - signs I have to create the strings without them, then edit them. I'll try to pin this down, but if anyone can clarify string handling by the 48 it might help. -- William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2. Tel. (902)426-1577 UUCP=..!{uunet|watmath}!dalcs!biome!silvert BITNET=silvert%biome%dalcs@dalac InterNet=silvert%biome@cs.dal.ca