Results 1 to 5 of 5

Thread: Integers integers...

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Integers integers...

    How would i add two variables together? Also, how would i subtract two variables? I tried multiple times and can't get it right. Someone show me a quick procedure on it. Thanks!

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm on my iPod but its simple really..
    SCAR Code:
    var
      A, b, c : integer;
    begin
      A:= 2;
      B := 4;
      C := a + b;
      Writeln(inttostr(c));
      //or
      A := (a + b);
      //not sure if that one would work, as i'm a bit rusty.
    End.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    I'm on my iPod but its simple really..
    SCAR Code:
    var
      A, b, c : integer;
    begin
      A:= 2;
      B := 4;
      C := a + b;
      Writeln(inttostr(c));
      //or
      A := (a + b);
      //not sure if that one would work, as i'm a bit rusty.
    End.
    It's right. You can also use
    SCAR Code:
    IncEx(A, B);
    in that case.

  4. #4
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys! Trying to make a SCAR calculator.

  5. #5
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Junkj View Post
    Thanks guys! Trying to make a SCAR calculator.
    nice

    that would be a fun script to make
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

Thread Information

Users Browsing this Thread

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

Posting Permissions

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