For Programmers: Free Programming Magazines  


Home > Archive > Fortran > October 2004 > Case sensitive arguments to coco text & copy mechanism









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Case sensitive arguments to coco text & copy mechanism
Stig Kildegård Andersen

2004-10-18, 4:01 am

I would like to be able to preserve the case of arguments in the text and
copy mechanism of Dan Nagle's coco. It appears that the arguments are
usually converted to lower case unless enclosed in '' or "", but if the
arguments are enclosed then the delimiters are also output to the expanded
text block.

Does anyone know if it is possible to preserve the case of the arguments?

Kind Regards and Thank You in Advance,
Stig Kildegård


Rich Townsend

2004-10-18, 4:00 pm

Stig Kildegård Andersen wrote:
> I would like to be able to preserve the case of arguments in the text and
> copy mechanism of Dan Nagle's coco. It appears that the arguments are
> usually converted to lower case unless enclosed in '' or "", but if the
> arguments are enclosed then the delimiters are also output to the expanded
> text block.
>
> Does anyone know if it is possible to preserve the case of the arguments?


I've had this problem too, Unfortunately, I understand that Dan has been
v. busy recently -- so much so that he's been unable to do any work on
coco.

Since this problem was a bit of a showstopper for me, I decided to
switch to Joerg Behrens' fpx3 preprocessor system; it is a pretty
polished product, and is much more flexible than others I've tried. The
only quibble is that it is written in Perl rather than Fortran, but
nowadays Perl seems to be so ubiquitous that this may not be the
drawback it used to be. YMMV.

cheers,

Rich

--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware

[ Delete VOID for valid email address ]
Stig Kildegård Andersen

2004-10-19, 9:05 am

> Since this problem was a bit of a showstopper for me, I decided to switch
> to Joerg Behrens' fpx3 preprocessor system; it is a pretty polished
> product, and is much more flexible than others I've tried. The only
> quibble is that it is written in Perl rather than Fortran, but nowadays
> Perl seems to be so ubiquitous that this may not be the drawback it used
> to be. YMMV.


Thank you for the goood advice. I am trying fpx3 now and it does seem very
capable. It can even handle spaces in arguments to macros (subs). Is there a
clever way to handle arguments that contain commas with fpx3?

Kind Regards and Thank You in Advance,
Stig


Rich Townsend

2004-10-19, 3:58 pm

Stig Kildegård Andersen wrote:
>
>
> Thank you for the goood advice. I am trying fpx3 now and it does seem very
> capable. It can even handle spaces in arguments to macros (subs). Is there a
> clever way to handle arguments that contain commas with fpx3?


Yes -- I've just discovered it myself! In a similar manner to what one
does with Makefiles, you define a macro that expands to a comma. Here is
an example:

$define $COMMA ,

$define $CSL $sub
print *,$str($1)
$endsub

$CSL(This${COMMA}is${COMMA}a${COMMA}comm
a-separated${COMMA}list)

HTH,

cheers,

Rich

--
Dr Richard H D Townsend
Bartol Research Institute
University of Delaware

[ Delete VOID for valid email address ]
Stig Kildegård Andersen

2004-10-20, 3:56 am

> $define $COMMA ,
>
> $define $CSL $sub
> print *,$str($1)
> $endsub
>
> $CSL(This${COMMA}is${COMMA}a${COMMA}comm
a-separated${COMMA}list)


Thank You again :-)

Kind Regards,
Stig


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com