Results 1 to 2 of 2

Thread: Question: functions...

  1. #1
    Join Date
    Nov 2007
    Location
    USA midwest
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Question: functions...

    Hi, I am new to scripting.
    I am trying to make my first script.
    I am sort of stuck on a problem.

    1.Can functions be used in main looops?
    I want to use a function in a main loop, but I am certain functions can't be used in main looops. I have not tried this yet.

    The reason why I want to use this function in a main loop is because the function returns a value then it does something afterwards, so it seems like it is a procedure.
    The specific function I am using is the FindBank function in the srl includes.
    I was wondering how I can use this function in my main loop because it says it finds bank and then opens.

    My guess is make a procedure that includes the function but I won't have to state the function before the procedure because it is coming from includes.
    So...I will try other ways. Any suggestions would help thanks.

  2. #2
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yah you can use it

    Like this?

    Code:
    program new;
    
    function newFunction : Boolean;
    begin
         if(something) then
         result := true;
    end
    
    begin
         newFunction;
    end.
    Extinct.

    Formally known as Drags111.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Various Functions
    By sirlaughsalot in forum Research & Development Lounge
    Replies: 5
    Last Post: 02-19-2009, 04:57 PM
  2. Some functions...
    By Negaal in forum Research & Development Lounge
    Replies: 11
    Last Post: 02-16-2008, 12:29 PM
  3. Functions
    By lordsaturn in forum OSR Help
    Replies: 1
    Last Post: 08-13-2007, 10:12 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
  •