1. conditional expressions and more
- Posted by mike burrell <mikpos at GAIANET.NET> Nov 30, 1996
- 1695 views
- Last edited Dec 01, 1996
yea okay basically i'm wondering if there's some way to use sequences in conditional expressions while avoid that oh-so-annoying conditional expression must be an atom error... if you don't know what i'm talking about, i want to do something like this: sequence a,b a = "fred" b = "bob" if a = b then puts(1,"they are the same\n") else puts(1,"they are not the same\n") end if abort(1) okay so you see i want to compare two sequences without going through some sort of costly looping routines and that... oh and one other thing... does someone want to double check me on whether the vga bios stores pixel information starting at offset #A0000... uhhh yea so thanks :> ...oooO MikPos of MARTYR Oooo... ..ooO http://www.geocities.com/SoHo/9036 Ooo.. ....oooO mike burrell OOooo....
2. Re: conditional expressions and more
- Posted by Snowgen <snowgen at WF.NET> Nov 30, 1996
- 1698 views
- Last edited Dec 01, 1996
> yea okay basically i'm wondering if there's some way to use sequences > in conditional expressions while avoid that oh-so-annoying > conditional expression must be an atom error... if you don't know > what i'm talking about, i want to do something like this: I'm new here, but I'm pretty sure that the answer is to use the compare() function. Using your example: > sequence a,b > > a = "fred" > b = "bob" > > if a = b then change that line to be: if compare(a, b) = 0 then > puts(1,"they are the same\n") > else > puts(1,"they are not the same\n") > end if > > abort(1) > I tested it, and it seems to work... __ Snowgen snowgen at wf.net http://www.wf.net/~snowgen/
3. Re: conditional expressions and more
- Posted by mike burrell <mikpos at GAIANET.NET> Nov 30, 1996
- 1709 views
- Last edited Dec 01, 1996
> > if a = b then > > change that line to be: > > if compare(a, b) = 0 then > > puts(1,"they are the same\n") > > else > > puts(1,"they are not the same\n") > > end if > > > > abort(1) > I tested it, and it seems to work... hey wow... thx a lot :> ...oooO MikPos of MARTYR Oooo... ..ooO http://www.geocities.com/SoHo/9036 Ooo.. ....oooO mike burrell OOooo....