Fizzbuzz in SNOBOL4

Posted by Daniel Lyons Mon, 31 Dec 2007 18:06:00 GMT


**  FizzBuzz in SNOBOL4
**
**  Daniel Lyons <fusion@storytotell.org>
**
**  Yes, I am insane, before you ask.
**
**

        I = 1
LOOP    FIZZBUZZ = "" 
        EQ(REMDR(I, 3), 0)              :F(TRY_5)
        FIZZBUZZ = FIZZBUZZ "FIZZ" 
TRY_5   EQ(REMDR(I, 5), 0)              :F(DO_NUM)
        FIZZBUZZ = FIZZBUZZ "BUZZ"      
DO_NUM  IDENT(FIZZBUZZ, "")             :F(SHOW)
        FIZZBUZZ = I
SHOW    OUTPUT = FIZZBUZZ
        I = I + 1
        LE(I, 100)                      :S(LOOP)
END

Tags , ,  | 3 comments

Comments

  1. Avatar Andrew Hedges said about 5 hours later:

    Yes, but is it SNOBOL4ic? ;-)

  2. Avatar Shannon said 9 months later:

    Hi,

    I have project about SNOBOL. I haven’t heard about SNOBOL. I trying find programming in C language. Just program that read text to seprate tokens: I need to Resource words (31 in C), Special characters and constant variables. This is my report SNOBOL. Let me know and I need your help…

    Thanks, Shannon

    butterflykiss0@yahoo.com

  3. Avatar Shannon said 9 months later:

    Hi,

    I have project about SNOBOL. I haven’t heard about SNOBOL. I trying find programming in C language. Just program that read text to seprate tokens: I need to Reserve words (31 in C), Special characters and constant variables. This is my report SNOBOL. Let me know and I need your help…

    Thanks, Shannon

    butterflykiss0@yahoo.com

(leave url/email »)

   Comment Markup Help Preview comment