Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageStig 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 ]
Post Follow-up to this message> 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
Post Follow-up to this messageStig 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 ]
Post Follow-up to this message> $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
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.