Got it... I am yet to dabble with CFCs.

Thank you.

----- Original Message -----
From: Barney Boisvert
To: CF-Talk
Sent: Monday, December 29, 2003 1:56 PM
Subject: RE: Is this valid syntax for accessing CFFUNCTION return

That'll work fine for structs and objects, but won't for arrays.  In other
words this won't work:

<cfset myVar = myFuncReturningArray()[3] />

I'm not sure what happens when dealing with recordsets.

Whether you make use of that or not is a stylistic question.  Personally, I
don't add anything after a function call except another method call,
preferring to assign the result to a temp variable first.

Cheers,
barneyb

> -----Original Message-----
> From: stas [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 29, 2003 10:42 AM
> To: CF-Talk
> Subject: Is this valid syntax for accessing CFFUNCTION return
>
> If a function returns a complex data type as a result, say a
> struct, can I
> shorthand it like this?
>
> <cfset myVar = myFunc().struct_key>
>
> That is, I've tested this to work, but I want know if this is
> the "official"
> behavior.
>
> Thanks!
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to