On 11/24/2013 08:09 PM, Tony Zampini wrote:
> In general, if you have a one element vector list, and want to use it
> where a vector is required (such as the move() statement), you can simply
> include the index of the first (and only) element, which is 0. For example:
>    move(vectorlist);     // Compile error
>    move(vectorlist[0]);    // Legal statement
> Bertho, please correct me if I'm wrong.

You are right. You can always index the vectorlist, and, if you know
there is only one vector in it, the index at 0 will give you that vector.

<pedantic_mode>
There is a small nuance in your example regarding the comment. The
"compile error" is actually a "run-time error". Gcmc does not know the
type of a variable until it is evalueted at run-time (it uses lazy
evaluation and late binding). The first move would be syntactically
correct, but it is semantically wrong, due to a type-mismatch, and
therefore still result in an error.
</pedantic_mode>

-- 
Greetings Bertho

(disclaimers are disclaimed)

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to