Results 1 to 3 of 3

Thread: variables

  1. #1
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default variables

    SCAR Code:
    program New;
    {.include srl/srl.scar}
    var
    time : Extended;

    begin
    cleardebug;
    time := 1/7
    writeln(floattostr(time));
    end.
    why does it give an answer = 0?

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

    Default

    You need to declare the 1 and 7 as Extended as well:
    pascal Code:
    program New;
    {.include srl/srl.scar}
    var
    time : Extended;

    begin
    cleardebug;
    time := 1.0/7.0;
    writeln(floattostr(time));
    end.



    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)

  3. #3
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thx and i posted a thread about anti ban could u answer my questtion plz

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
  •