Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

bbcode v0.1

Name: Anonymous 2007-09-11 22:38 ID:uR52DJVN

[bbcode]
[title="Hello World"]
[author="Anonymous"]

[main]
  [let="a"]5[/let]
  [while]a>0[do]
  [let="a"]a-1[/let]
  Hello, World!
  [val="a"]
  [/do]
  [/while]
  [call="test"]
[/main]

[test]
hihihi world!
[/test]

[/bbcode]

suggest and improve.

Name: Anonymous 2007-09-13 17:55 ID:2lxbdI5m

>>49
I haven't decided how to handle strings yet, right now strings can't have spaces (or they are considered separate strings), if I decide to have a special syntax for strings I might drop [var], but I like it because it's really BBCodesque.  I added some more primitives and got a recursive Fibonacci algorithm working (I actually didn't know I could call the functions from inside themselves, but now I know):
[def] fib
    [ls]n[/ls]
    [if][equal][var]n[/var] 0[/equal]
        0
        [if][equal][var]n[/var] 1[/equal]
            1
            [add]
                [fib][sub][var]n[/var] 1[/sub][/fib]
                [fib][sub][var]n[/var] 2[/sub][/fib]
            [/add]
        [/if]
    [/if]
[/def]

[fib]8[/fib]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List