Re: [AMBER] nab string functions

From: M. L. Dodson <mldodson.comcast.net>
Date: Sun, 15 Jan 2012 19:17:31 -0600

On Jan 15, 2012, at 6:55 PM, Daniel Roe wrote:

> Hi,
>
> NAB string functions are listed on pg. 290 of the AT1.5 manual, and
> they still appear to work.
>
> test.nab:
> string s, regexp, t;
> s="987";
> regexp="12";
> t="1234";
> printf("%s\n",t);
> gsub(regexp, s, t);
> printf("%s\n",t);
>
> Output:
> 1234
> 98734
>
> -Dan

Mine are on page 292/405 as:
14.8 String Functions
...

Maybe my installation is foobar, but all tests pass. Furthermore, a
find . -type f | xargs grep gsub
in ~/src/amber11/AmberTools/src/nab gave no output.
Same behavior, same command from ~/src/amber11/AmberTools;
same for ~/src/amber11/include

nab get_coords.nab
get_coords.nab:15 Symbol match not declared.
nab2c failed!

Similar behavior for sub(), gsub(). index() and substr() seem OK.

Is there a nab header file I need to include?

This is on Mac OS X 10.6.8

I'm frankly at a loss unless the Mac is foobar for regular expressions.

Bud

>
> On Sun, Jan 15, 2012 at 7:34 PM, M. L. Dodson <mldodson.comcast.net> wrote:
>> Hi,
>>
>> Writing some nab utility progs.
>>
>> Several string functions (p292 of AT-1.5 documentation) do not see to be
>> there any more, e.g, sub(), gsub(). Is this an error in the docs or in the
>> distribution? Makes it hard to port perl MD utility code to nab.
>>
>> Thanks,
>> Bud Dodson
>> --
>> M. L. Dodson
>> Business email: activesitedynamics-at-gmail-dot-com
>> Personal email: mldodson-at-comcast-dot-net
>> Gmail: mlesterdodson-at-gmail-dot-com
>> Phone: eight_three_two-five_63-386_one
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
> --
> -------------------------
> Daniel R. Roe, PhD
> Postdoctoral Associate
> BioMaPS Institute, Rutgers University
> 610 Taylor Road
> Piscataway, NJ 08854
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber

-- 
M. L. Dodson
Business email: activesitedynamics-at-gmail-dot-com
Personal email: mldodson-at-comcast-dot-net
Gmail: mlesterdodson-at-gmail-dot-com
Phone: eight_three_two-five_63-386_one
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Jan 15 2012 - 17:30:02 PST
Custom Search