X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Jun 2006 02:31 PM by  anon
keywords
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
23 Jun 2006 02:31 PM
    hello what are keywords ? what difference between some "keyword" and "/keyword" ? if i use keywords in procedure arguments i can return some value from there ? for example ENVI_SELECT,dims=dims,fid=image_fid,pos=pos,title='select' i return dims,image_fid etc i was thinking that procedures are not return any values. thanks a lot

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2006 02:31 PM
    The syntax "/MYKEYWORD" is nothing more than a simple substitute (an abbreviation) for "MYKEYWORD=1". By default keywords set to a variable AND all positional arguments that are variables are passed by reference. That is, those variables that appear in either a FUNCTION or a PRO call will return to the caller with the state they have acquired after execution of the last line of the FUNCTION or PRO. The following are the only arguments or ketword settings that are NOT passed by reference: - Expressions - Constants - System variables - Subscripted array variable references James Jones

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Jun 2006 02:31 PM
    If you change the values of dims, image_fid etc... from within the ENVI_SELECT procedure then when you get back from the one who called ENVI_SELECT the values of dims, image_fid, etc will have the changed values. That is what is meant by pass by reference as James mentioned. Wade
    You are not authorized to post a reply.