Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!mips!wrdis01!gatech!usenet.ins.cwru.edu!ysub!psuvm!cunyvm!ndsuvm1!mtus5!jmeyers From: JMEYERS@MTUS5.BITNET Newsgroups: comp.sys.handhelds Subject: Re: Progamming Flags Message-ID: <91124.120412JMEYERS@MTUS5.BITNET> Date: 4 May 91 17:04:12 GMT References: <9105021444.AA14927@enuxha.eas.asu.edu> <15533@life.ai.mit.edu> Organization: Computing Technology Services, Michigan Technological Univ. Lines: 39 In article <15533@life.ai.mit.edu>, bson@rice-chex.ai.mit.edu (Jan Brittenson) says: > >In a posting of [2 May 91 14:44:20 GMT] > salvato@enuxha.eas.asu.edu (Vincent H. Salvato) writes: > > > I want to write a program that if symbolic is on it automaticaly turns > > it off and says "SYM OFF" and in turn if symbolic is already off I > > want it to turn it on and say "SYM ON". > >One possible solution (67.5 bytes): > > << "SYM O" 1 FS?C "FF" << 1 SF "N" >> IFTE + 1 DISP 1 FREEZE >> > > >Of course, if you compromise your demands, it can be reduced: > > << 1 FS?C "NUM" << 1 SF "SYM" >> IFTE 1 DISP 1 FREEZE >> > >The latter will say "NUM" or "SYM". It's 61 bytes. > > -- Jan Brittenson > bson@ai.mit.edu The problem with these programs is that they test the wrong flag. You want to test flag -3. 1 is a user flag (ie it does nothing). Flag -3 determines the status of symbolic vs. numerica results. Sincerely, Jason P. Meyers /========================= /======================================== | JMEYERS@mtus5.cts.mtu.edu | | | or | H H PPPP 44 888 SSS X X | | JMEYERS@MTUS5.BITNET | H H P P 4 4 8 8 S X X | | HP-48 list owner | HHHHH PPPP == 4 4 888 SSS X | >-------------------------< H H P 444444 8 8 S X X | | Michigan Technological | H H P 4 888 SSS X X | | University | | =========================/ ========================================/