Results 1 to 7 of 7

Thread: Stupid Question, But I never really thought about it...

  1. #1
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Stupid Question, But I never really thought about it...

    Ok, I dont think any of the tuts covered this:

    if I state a function in a if statement like "If(blabla) then" will it still do blabla, or do I have to have it do blabla

    lol

  2. #2
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have to have it do blabla i dont think there is a way to make it not do it

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

    Default

    SCAR Code:
    program New;

    function Hello: Boolean;
    begin
      writeln('Hello');
      Result:= True;
    end;

    begin
      if(Hello)then
        Hello;
    end.
    Is that what you were asking?

  4. #4
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i dk, I was asking, if I said

    If(hello) then
    watever



    would it do hello?

  5. #5
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Yes it would.

    (as bullzeye95's example proves)

  6. #6
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Just for 100% percent clarification:
    SCAR Code:
    Program New;

    function NumberRight: Boolean;
    begin
      if(3-3 = 0)then
      begin
        Result:= True;
      end;
    end;

    begin
      if(NumberRight)then // Check Comment *
      Writeln('It was right!')
    end.
    * It runs the function, and then validates if the function is true or false.

    -Knives

  7. #7
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    got it

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Stupid Question¿
    By anonymity in forum OSR Help
    Replies: 4
    Last Post: 02-15-2009, 11:19 PM
  2. REALLY stupid question
    By lolpie in forum OSR Help
    Replies: 6
    Last Post: 01-27-2007, 12:16 AM

Posting Permissions

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