Hi All,
Can you please tell me How to call from one Routine to another Routine..
Thanks in Advance,
About routines
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
DS routines
Please let me know the syntax..
I am writing routine in BASIC language.
While calling one routine from another routine i have used "call (....)" for ex..
i have a routine A. I want to call this A in routine B. Where as A is having arguments (jobname,stagename,input1,input2 and output).
i m calling this routine like ans= call A(arguments)
but is showing error messages..
pls let me know do i need to include any header files while coding.
Thanks in advance
I am writing routine in BASIC language.
While calling one routine from another routine i have used "call (....)" for ex..
i have a routine A. I want to call this A in routine B. Where as A is having arguments (jobname,stagename,input1,input2 and output).
i m calling this routine like ans= call A(arguments)
but is showing error messages..
pls let me know do i need to include any header files while coding.
Thanks in advance
If you have a routine called...
CallMe(Arg1)
You can call this from anther routine by using:
CALL DSU.CallMe(Ans,Arg1)
Ans is the return from CallMe. You need to add DSU. to the routine name to fully qualify it.
It's not possible to use Ans=CALL DSU.CallMe(Arg1). Using CALL to call a function, the first param is the return value (this is passed by reference).
Hope this is of help.
CallMe(Arg1)
You can call this from anther routine by using:
CALL DSU.CallMe(Ans,Arg1)
Ans is the return from CallMe. You need to add DSU. to the routine name to fully qualify it.
It's not possible to use Ans=CALL DSU.CallMe(Arg1). Using CALL to call a function, the first param is the return value (this is passed by reference).
Hope this is of help.
You're confusing Functions with Routines. You declare external Functions using the DEFFUN statement, search the forum for that syntax. Then the Function can be used inline anywhere within your current Function or Routine. We CALL Routines and they don't need any declaration, just note that it has a DSU. prefix to the name you supply.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks OddJob
OddJob wrote:If you have a routine called...
CallMe(Arg1)
You can call this from anther routine by using:
CALL DSU.CallMe(Ans,Arg1)
Ans is the return from CallMe. You need to add DSU. to the routine name to fully qualify it.
It's not possible to use Ans=CALL DSU.CallMe(Arg1). Using CALL to call a function, the first param is the return value (this is passed by reference).
Hope this is of help.