[Thread Prev][Thread Next][Index]
Re: sub-string of string containing '('
Hi Arindam,
You can use CANCEL MODE LONGITUDE_FORMAT to eliminate the parentheses:
yes? define axis/x=-180:180:1/unit=degrees xminus
yes? say `x[gx=xminus,x=-160],return=xstart`
160W(-160)
yes? cancel mode longitude_format
yes? say `x[gx=xminus,x=-160],return=xstart`
-160
- steve
====================================
Arindam Chakraborty wrote:
> hello ferreters,
> I wanted to get the initial (or final) longitude of a
> variable using
> def sym loni = `var_name,r=xstart`
> which results in a string of the kind
> 68.906E(68.90625)
>
> How do I extract the longitude value from here? I tried using
> ppl set str1 $element(1,"(",loni)
> which results in an error like this:
> **ERROR: command syntax: unpaired quotation marks, grave accent or
> brackets
>
> How do I get rid of this?
> Many thanks in advance.
>
> Arindam
> ------------------------------------------
> ARINDAM CHAKRABORTY
> Centre for Atmospheric & Oceanic Sciences
> Indian Institute of Science
> Bangalore 560 012; INDIA
> Tel: 091-080-3942505, 091-080-3600450
> Fax: 091-080-3600865
> __________________________________________
--
| NOAA/PMEL | ph. (206) 526-6080
Steve Hankin | 7600 Sand Point Way NE | FAX (206) 526-6744
| Seattle, WA 98115-0070 | hankin@pmel.noaa.gov
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement