You may have to declare Vessels.Speed as an alias.
eg.
Dim speedAlias As Alias
speedAlias = "Vessels.Speed"
Print TimeToTarget(DistToTarget, speedAlias)
At least you don't have to assign it every time.
r
On Mon, 5 Jul 2004 13:37:28 +0800, SCISOFT <[EMAIL PROTECTED]> wrote:
Just as suggestion - Try enclosing the Vessels.Speed in [], within the command calling the function. eg, Print TimeToTarget(DistToTarget, [Vessels.Speed])
Ian Thomas GeoSciSoft - Perth, Australia
-----Original Message----- From: David Baker [mailto:[EMAIL PROTECTED] Sent: Monday, 5 July 2004 1:24 PM To: [EMAIL PROTECTED] Subject: MI-L Use fields in functions
I'm hoping someone can clarify whether I am doing something wrong or whether I have run into a limitation of MapInfo.
I am trying to include a field name as a parameter of a function call. However, I get an error:
"Subroutine argument Vessels not defined. Found [.] while looking for [)].
The error line looks like this:
Print TimeToTarget(DistToTarget, Vessels.Speed)
Obviously it is looking for a variable name as the 2nd parameter, but finding a field name instead.
If I do it like this:
VesselsSpeed = Vessels.Speed Print TimeToTarget(DistToTarget, VesselsSpeed)
everything works fine. However, this is an extra line & more mess, so I
just want to
clarify whether it should actually be possible to use a field name as a
parameter for a
function or not, possibly by some other declaration that I haven't thought
about?
Thanks,
Dave
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12441
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12442
--
Robert Crossley Agtrix P/L 9 Short St PO Box 63 New Brighton 2483 Far Southern Queensland AUSTRALIA
153.549004 E 28.517344 S
P: 02 6680 1309 F: New Connection M: 0419 718 642 E: [EMAIL PROTECTED] W: www.agtrix.com W: www.wotzhere.com
--------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 12443
