[gradsusr] Continuation character in scripting language?

Jennifer Adams jma at cola.iges.org
Mon Mar 31 15:41:43 EDT 2014


On Mar 31, 2014, at 2:09 PM, Jeff Duda wrote:

> No, that's not what I'm looking for.  That's the concatenation operator.  I'm looking for a symbol that can extend very long command lines across multiple lines of text. 
> 
> For example,
> 
> script command
> script command
> 'define var1='
> 'define var2='

a='function of 'var1
b='function of 'var2
c='function of other vars' 
d='function of other script variables'
e='function of vars squared' 
f='other terms' 
g='more other terms'
h='more more other terms'

'var3='a'+'b'+'c'+'d'+'e'+'f'+'g'+'h

Keep your code human readable. In this case, longer isn't better. 
There is no continuation character; for best results, each line of your script should be under 512 characters long.
--Jennifer


> 
> I'd want to be able to put the above line on multiple lines of text instead of leaving it all on one.
> 
> Jeff
> 
> 
> On Mon, Mar 31, 2014 at 1:01 PM, Ricardo Hallak <ricardo.hallak at iag.usp.br> wrote:
> Hi Jeff,
> 
> hope this is what you are looking for:
> 
> For very large commands, you can concatenate strings:
> 
> string1="averylargecommand_1"
> string2=" averylargeciommand_2"
> 
> 'd 'string1&string2
> 
> You have to manipulate blank spaces and quotes properly.
> 
> Hope this helps,
> Ricardo
> 
> De: "Jeff Duda" <jeffduda319 at gmail.com>
> Para: "GrADS Users Forum" <gradsusr at gradsusr.org>
> Enviadas: Sexta-feira, 28 de Março de 2014 18:36:14
> Assunto: [gradsusr] Continuation character in scripting language?
> 
> 
> Hello,
> Is there a continuation character in the Grads scripting language (i.e., something analogous to the & character for FORTRAN)?
> 
> Jeff Duda
> 
> -- 
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> 
> 
> -- 
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140331/bde1a5af/attachment-0001.html 


More information about the gradsusr mailing list