possible to improve Grads for some deficiencies?

Pablo Romero romero619 at HOTMAIL.COM
Thu Feb 26 16:02:44 EST 2009


Stephen,
your method WILL work if it includes the semicolon, as Charles had mentioned in his response(I didnt see it in your examples, Im guessing it was just a typo and you forgot to add the semicolons).

The grads script parsing code treats semicolons in the same way it treats newline characters, EXCEPT for the final newline character that it expects in order to complete a line of commands in a script file; so, the ';' will still not solve the issue with GRADS ignoring the last line of a script file *if* the final newline character is missing...
i.e., the following example wont work

'set lon -120 -100'
'set lat 10 30'
'd tmp'
say 'this is the last line of script code';{EOF: no newline character here}

the last line won't be processed, even if it ends with a semi-colon.

I *believe* this might be more of a windows issue, since I believe that most *nix text editors automatically will insert the last newline character, so its a non-issue in unix/linux (however, I might be wrong about this; need confirmation).

Pablo


________________________________
> Date: Thu, 26 Feb 2009 14:34:51 -0600
> From: smcmillan at PLANALYTICS.COM
> Subject: Re: possible to improve Grads for some deficiencies?
> To: GRADSUSR at LIST.CINECA.IT
>
> Pablo, Slavoed,
> Your responses are interesting, but
> I routinely use comments to the right of a line, i.e., no # or * as the
> first character. The comment portion must be separated from (and
> to the right of the active portion of the line) by ';' followed by a '*'
> or '#' then a comment (one or more spaces may separate the '*' or '#' and
> the comment). However, I don't know if this is true for all versions.
> I am currently using version 1.9.0-rc1 on a Windows XP. I have
> not tried on non-Windows or later versions.
> Stephen
>
>
> Pablo Romero
> Sent by: GRADSUSR at LIST.CINECA.IT
>
> 02/26/2009 02:04 PM
> Please respond to
> GRADSUSR at LIST.CINECA.IT
>
> To
> GRADSUSR at LIST.CINECA.IT
> cc
> Subject
> Re: possible to improve Grads for some
> deficiencies?
>
>
>
>
> I took a look at the grads source code, and from what
> I see/understand, commenting only works if the first character on a line
> is either '*' or '#', so attempting to comment anywhere else on a line
> won't work. I also tested this and confirmed that it doesnt work.
>
> Unfortunately, this is hard-coded into the 'gs script'
> parsing code within the grads source code; it would need to be re-coded
> by COLA.
>
> I would recommend adding it as a feature request within
> the tracker on the GRADS sourceforge site:
>
> http://sourceforge.net/tracker/?atid=821185&group_id=161773&func=browse
>
> Pablo
>
> ________________________________
>> Date: Thu, 26 Feb 2009 13:48:10 -0600
>> From: smcmillan at PLANALYTICS.COM
>> Subject: Re: possible to improve Grads for some deficiencies?
>> To: GRADSUSR at LIST.CINECA.IT
>>
>> Slovoed,
>> 1. Do you mean the expression
>> "return" or an end-of-line return (as when pressing the
> Enter
>> key)? If the former, "return" required at end of function,
>> otherwise you should include a "return" (carriage return)
> after
>> last line of script. However, I am referring to Windows versions--don't
>> know about others.
>> 2. The * (or #) is not needed
>> in the first column for commenting. You can also place it at the
>> end of a line, for example:
>>
>> prompt 'What is your name? '*
>> Last name only
>> pull myname
>> prompt 'What is your age? '# Age
>> in whole years only
>> pull myage
>>
>> Stephen
>>
>>
>> slovoed slovoed
>> Sent by: GRADSUSR at LIST.CINECA.IT
>>
>> 02/26/2009 04:09 AM
>> Please respond to
>> GRADSUSR at LIST.CINECA.IT
>>
>> To
>> GRADSUSR at LIST.CINECA.IT
>> cc
>> Subject
>> possible to improve Grads for some deficiencies?
>>
>>
>>
>>
>> hi,
>>
>> I have been using Grads for many years. As I know, there
>> are some deficiencies in Grads I can not slove it since I have no
> knowledge
>> about the source code of Grads.
>>
>> 1. on the last line of script, one "Return"
>> must be added, otherwise it fail to run the last line.
>>
>> 2. * is used to comment some certain lines in script,
>> but * must be placed in the first column, otherwide will report the
> error.
>> It's not useful to let the script nice-looking and easy to read. Does
>> it like matlab, * can be placed anywhere for commenting.
>>
>> The points above might be easily solved by code developer,
>> aren't they?
>>
>>
>> slovoed
>>
>>
>>
>>
>>
>>
>> ***************************************************
>>
>> The information contained in this e-mail message is intended only
> for the use of the recipient(s) named above and may contain information
> that is privileged, confidential, and/or proprietary. If you are not the
> intended recipient, you may not review, copy or distribute this message.
> If you have received this communication in error, please notify the sender
> immediately by e-mail, and delete the original message.
>>
>> ***************************************************
> _________________________________________________________________
> Windows Live™: Discover 10 secrets about the new Windows Live.
> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!7540.entry?ocid=TXT_TAGLM_WL_t2_ugc_post_022009
>
>
>
>
>
> ***************************************************
>
> The information contained in this e-mail message is intended only for the use of the recipient(s) named above and may contain information that is privileged, confidential, and/or proprietary. If you are not the intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify the sender immediately by e-mail, and delete the original message.
>
> ***************************************************
_________________________________________________________________
Windows Live™ Hotmail®…more than just e-mail.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_022009



More information about the gradsusr mailing list