Hi
Does anyone know if you can have can have a function where you don’t need to pass all the parameters. Within the function, all undefined parameters take on a default value.
Eg Draw_Line (start_pos, stop_pos, Colour) is the function, and colour is default to black
So
Draw_Line(start_pos, stop_pos) would draw a black line
Draw_Line(start_pos, stop_pos, RED) would draw a red line
Regards
Jon
---
You are currently subscribed to vrf as: hua_jing@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
Does anyone know if you can have can have a function where you don’t need to pass all the parameters. Within the function, all undefined parameters take on a default value.
Eg Draw_Line (start_pos, stop_pos, Colour) is the function, and colour is default to black
So
Draw_Line(start_pos, stop_pos) would draw a black line
Draw_Line(start_pos, stop_pos, RED) would draw a red line
Regards
Jon
---
You are currently subscribed to vrf as: hua_jing@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
The downside is you get a cryptic function definition, i.e Draw_Line(rec) instead of Draw_Line(start_pos, stop_pos, colour)
_____
From: Jon Kershaw [mailto:jon@sequans.com]
Sent: 23 August 2007 10:24
To: VRF
Subject: [vrf] passing optional function paramters
Hi
Does anyone know if you can have can have a function where you don’t need to pass all the parameters. Within the function, all undefined parameters take on a default value.
Eg Draw_Line (start_pos, stop_pos, Colour) is the function, and colour is default to black
So
Draw_Line(start_pos, stop_pos) would draw a black line
Draw_Line(start_pos, stop_pos, RED) would draw a red line
Regards
Jon
---
You are currently subscribed to vrf as: Warren.Pickles@tycoelectronics.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
---
You are currently subscribed to vrf as: hua_jing@agilent.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".