[gradsusr] continue a line

Jennifer Adams jma at cola.iges.org
Mon Sep 17 07:56:44 EDT 2012


Kevin's technique can make your long expressions a little more readable, but there is also this option: 

cmd='blah blah blah'
cmd=cmd%'blah blah blah'
cmd=cmd%'blah blah blah'

--Jennifer



On Sep 17, 2012, at 3:22 AM, Kevin Huyck wrote:

> I have searched for an answer to this question, too. To my knowledge there is no line continuation syntax in GrADS. When I have a long calculation, I break it into parts across several lines, often including some extra variables.
> 
> Example:
> * One line
> 'define esat=0.611*pow(10,(7.5*(tmp_isbl-273.15))/(237.3+(tmp_isbl-273.15)))'
> 
> * Several lines. Note "undefines" when we are done with the temporary values.
> 'define tmp=(tmp_isbl - 273.15)'
> 'define a = pow(10, (7.5 * tmp) / (237.3 + tmp))'
> 'define esat = 0.611 * a'
> 'undefine tmp'
> 'undefine a'
> 
> Hope this helps. Good luck.
> 
> Kevin L. Huyck
> Forecaster, Meridian Environmental Technology, Inc.
> klhuyck at meridian-enviro.com
> 
> Composed using Mozilla Thunderbird!
> 
> On 09/12/12 10:38, Athanasios Karagiannidis wrote:
>> 
>> hello to all.
>> 
>> My question may be a little ...dumb, but i'm stuck!
>> How can i continue a big expression (eg a sum) to the next line?
>> And as a secondary question: is there a maximum character length for GrADS scripts?
>> 
>> Thank you all.
>> 
>> A. Karagiannidis
>> 
>> Athanasios F. Karagiannidis
>> Physicist, PhD Meteorology and Climatology
>> E-mail: thankar at live.com
>> 
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
> <klhuyck.vcf>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120917/184f809f/attachment-0003.html 


More information about the gradsusr mailing list