Handler/Function with same name
Mark Smith
mark at maseurope.net
Sun Dec 11 13:12:17 EST 2005
I have a library stack with some commonly used stuff in it.
I have, in it's script:
on trim @aString
put word 1 to -1 of aString into aString
end trim
AND:
function trim aString
return word 1 to -1 of aString
end trim
To my surprise, this works perfectly well, so I can do:
trim myString
or:
get trim(myString)
depending on the context as to which is more convenient.
But I wonder if anyone knows of a good reason why one shouldn't have
a function and a handler with the same name?
Mark
More information about the use-livecode
mailing list