Results 1 to 4 of 4

Thread: Bug in SCAR

  1. #1
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default Bug in SCAR

    SCAR Code:
    program L337Calculator;

    const
    Question = 664*2+4/2+2*7/3+2.9+0.099999999999;

    begin
      ClearDeBug;
      if Question = 1337 then
      begin
        Writeln('LEET Calculator Made by ZYTEX');
        Writeln(FloatToStr(Question));
      end else
        Writeln(FloatToStr(Question));
    end.

    As you can see: The program will print out 'LEET Calculator Made by ZYTEX' if the answer is 1337, but now it only prints out 1337..

    EDIT: Add 1 more '9' to the Question and then it will print 'LEET Calculator Made by ZYTEX'

    EDIT2: Make the Question this: 664*2+4/2+2.0*7/3+2.9+0.099999999999; I only added '.0' It prints out '1337,66666666667'...

  2. #2
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Not the right spot to post bugs.
    This is :
    http://www.freddy1990.com/forums/index.php?board=15.0

    Anyway try this.
    SCAR Code:
    program L337Calculator;

    const
    Question = 664*2+4/2+2*7/3+2.9+0.099999999999;

    begin
      ClearDeBug;
      if Round(Question) = 1337 then
      begin
        Writeln('LEET Calculator Made by ZYTEX');
        Writeln(FloatToStr(Question));
      end else
        Writeln(FloatToStr(Question));
    end.
    Verrekte Koekwous

  3. #3
    Join Date
    Jan 2007
    Posts
    8,876
    Mentioned
    123 Post(s)
    Quoted
    327 Post(s)

    Default

    what does that does?

    EDIT: I mean the Round()

  4. #4
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by zytex View Post
    what does that does?

    EDIT: I mean the Round()
    Converts an integer to an extended.

    SCAR Code:
    program Hoi;
    begin
      Writeln(inttostr(Round(5.5)));
      Writeln(inttostr(Round(5.9)));
      Writeln(inttostr(Round(5.4)));
      Writeln(inttostr(Round(5.4999999999999)));
    end.
    Verrekte Koekwous

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 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
  •