Page 4 of 4 FirstFirst ... 234
Results 76 to 89 of 89

Thread: "Hello World"

  1. #76
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
    prints "Hello World!"
    Join the Official SRL IRC channel. Learn how to Here.

  2. #77
    Join Date
    Jul 2007
    Location
    Players[CurrentPlayer].Loc:='Bank'
    Posts
    875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exactly how do you use that to print hello world? I put just that in and got begin expected, added what's needed and got identifier expected. (I was assuming it was a scar code)
    Quote Originally Posted by sirlaughsalot
    .... Obama had the devil jump out of his ass, run and stab Hillary in the back...
    ILMMTYAEAFHPY.

  3. #78
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    richk, that's brainfuck

  4. #79
    Join Date
    Jul 2007
    Location
    Players[CurrentPlayer].Loc:='Bank'
    Posts
    875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    richk, that's brainfuck
    I hate brainfuck. So much...... It's mildly amazing that he knows how to do that.

    Edit mildly:=('amazing assuming it didn'+'t come from http://neworder.box.sk/newsread.php?newsid=13065');
    Quote Originally Posted by sirlaughsalot
    .... Obama had the devil jump out of his ass, run and stab Hillary in the back...
    ILMMTYAEAFHPY.

  5. #80
    Join Date
    Mar 2008
    Location
    Indiana
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He might have got from here...
    http://en.wikipedia.org/wiki/Brainfuck

  6. #81
    Join Date
    Apr 2007
    Posts
    994
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program new;

    {function decomp(text:string):tstringarray; }   {Nope, does not work. Is possible, can somebody tell me why?}
    {var
      i:integer;
      temp:tstringarray;
    begin
      setarraylength(temp,high(text));
      for i:=1 to high(text) do
      begin
        temp[i]:=StrGet(text,1);
      end;
      result:=temp;
    end; }



    function write(text:Tstringarray):boolean;
    var
      i,t:integer;
      waffle:tstringarray;
      dones,compile,original:string;
    begin
      original:= getdebugtext;
      waffle:=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',' ','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'];
      for i:=0 to high(text) do
      begin
        compile:=compile+text[i];
      end;
      original:=original+compile;
      for i:=0 to high(text) do
      begin
        repeat
          t:=random(53);
          cleardebug;
          writeln(dones+waffle[t]);
          wait(15);
        until(text[i]=waffle[t])
        dones:=dones+text[i];
      end;
    end;

    begin
    write(['H','e','l','l','o',' ','W','o','r','l','d']);
    //write(decomp('Hello World'));
    //decomp('Test');
    end.

    I looked at Boreas' and told myself I could do something like that too
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  7. #82
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    leelokhin, you need to set the length of temp as length(text), not high(text).

  8. #83
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Very simple one here but oh well...

    SCAR Code:
    program HelloWorld;

    Const
    h = 'H';
    e = 'e';
    l = 'l';
    o = 'o';
    w = 'W';
    r = 'r';
    d = 'd';

    Procedure HW;
    Begin
      ClearDebug;
      WriteLN(h+e+l+l+o+w+o+r+l+d);
    end;

    Begin
      HW;
    end.

  9. #84
    Join Date
    Dec 2007
    Location
    Canada
    Posts
    187
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program HelloWorld;

    const
    h='H';
    e='e';
    l='l';
    o='o';
    w='w';
    r='r';
    d='d';
    z=' ';

    Procedure HelloWorld;
    begin
    writeln(h)
     wait(200)
     writeln(e)
     wait(200)
      writeln(l)
      wait(200)
       writeln(l)
       wait(200)
        writeln(o)
        wait(200)
        writeln(z)
         wait(200)
          writeln(w)
          wait(200)
           writeln(o)
           wait(200)
            writeln(r)
            wait(200)
             writeln(l)
             wait(200)
              writeln(d)

     end;


    begin
    cleardebug;
     writeln('Prepare to be amazed......')
      wait(1000)
     HelloWorld;
    end.
    I'm baaaack

  10. #85
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {.include SRL/SRL.scar}

    var
     w: integer;
     
    function SendHello(sex: integer): string;
    begin
      case sex of
        1: Result := 'h';
        2: Result := 'e';
        3: Result := 'l';
        4: Result := 'l';
        5: Result := 'o';
        6: Result := '';
        7: Result := 'W';
        8: Result := 'o';
        9: Result := 'r';
        10: Result := 'l';
        11: Result := 'd';
        12: Result := '!';
      end;
    end;

    begin
      SetupSRL;
      ClearDebug;
      w := 1;
      for w := 1 to 12 do
      begin
        WriteLn(SendHello(w));
        w := w + 1;
      end;
    end.

    for some reason it only types every other letter.

  11. #86
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    That's because you have a for-loop and "w := w + 1;", that makes it add not one, but two a time
    Hup Holland Hup!

  12. #87
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    That's because you have a for-loop and "w := w + 1;", that makes it add not one, but two a time
    That is right. The entire idea of a for loop is that you do not have to automatically increase the index variable. It might still be handy to increase it in some cases though.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  13. #88
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    RC4 Cypher this time
    SCAR Code:
    program RC4Cypher;
    var
      s : array [0 .. 255] of byte;
      i, j : integer;
    const  cyphertext = 'k[âCòË ;e2';
           Key = 'SRLFtw';
    procedure InitRandomGen(key : string);
    begin
     for i := 0 to 255 do
         S[i] := i;
     for i := 0 to 255 do
     begin
       j := (j + S[i] + (ord(key[(i mod (length(key))+1)]))) mod 256;
       swap(S[i],S[j])
     end;
     i := 0;
     j := 0;
    end;
    function GenerateByte : byte;
    begin
      i := (i + 1) mod 256;
      j := (j + S[i]) mod 256;
      swap(s[i], s[j]);
      result := S[(s[i]+s[j]) mod 256];
    end;
    function EncryptRC4(text, key : string) : string;
    var CC, LL : integer;
    begin
      LL := length(text);
      InitRandomGen(key);
      result := text;
      for CC := 1 to LL do
      begin
        result[CC] := chr((ord(text[cc])) xor GenerateByte);
      end;
    end;
    begin
      writeln(EncryptRC4(cyphertext, key));
    end.
    I made a new script, check it out!.

  14. #89
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    This could grow into a considerable collection. Hello World hasnt left my mind this day.
    *MAJOR BUMP*

    Finally found this thread back. Too bad the Scar tags are misaligned. Can anyone add an original idea yet?
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. action="www.site.com" method="post"
    By Jason2gs in forum General
    Replies: 4
    Last Post: 05-17-2007, 11:50 PM
  2. Replies: 3
    Last Post: 04-19-2007, 03:44 AM
  3. Replies: 5
    Last Post: 10-26-2006, 11:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •