Hi All,
Can some one tell me what is difference in Transform Function and
Function from Routine Category.
What is the main difference between Transforms and Routines?
Please Asap.
Thank you
transforms functions and routines
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
The main difference is that transform functions are substituted at code generation time, whereas routines are called at execution time.
If you can easily do something in a transform function, you may see a performance benefit versus implementing the same task as a routine, since you are eliminating the overhead of the call.
If you can easily do something in a transform function, you may see a performance benefit versus implementing the same task as a routine, since you are eliminating the overhead of the call.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
Transforms are just 1 line DS BASIC logic that can be used inside your job in a derivation or constraint expression. When pre-compiling, the Transform name is expanded to the full logic expression stored. This means that if you change the logic in a Transform, all jobs using it must be recompiled.
A Function is a separate code-object that can be extended, expanded, revised, etc, without requiring recompiling jobs that use it. It also has the ability to be many lines long, has an excellent Test facility, as well as has the ability to do much with the rich DS BASIC language.
Use the one that works best for you. Someone will tell you that Transforms are faster because they are not Functions, and that is true if you compare a one line Function against a Transform. But, a 30 line Function can't be done in a Transform.
Use your judgement.
A Function is a separate code-object that can be extended, expanded, revised, etc, without requiring recompiling jobs that use it. It also has the ability to be many lines long, has an excellent Test facility, as well as has the ability to do much with the rich DS BASIC language.
Use the one that works best for you. Someone will tell you that Transforms are faster because they are not Functions, and that is true if you compare a one line Function against a Transform. But, a 30 line Function can't be done in a Transform.
Use your judgement.
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: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm