(j3.2006) Get_Command_Argument

Van Snyder Van.Snyder
Thu Dec 15 16:41:34 EST 2011


On Thu, 2011-12-15 at 13:07 -0800, Craig Dedo wrote:
>         Comments, anyone?

The discussion of UTF-16 and ISO-10646 is largely irrelevant to the
original problem I had:

I have a character string that needs to be sent to a C function.

I get it from the command line, using Get_Command_Argument.

Since I need to send it to a C function, it has to be kind C_Char.  This
leads to two choices:

1.  Cross my fingers and hope C_Char is the same as default kind.  Yes,
Bill is right that this is almost always the case.  In my line of work,
I have become accustomed to "almost" eventually biting you in the
backside, sometimes at enormous expense.  It's probably not a problem of
such magnitude for command-line arguments, but hard-won habits die hard.

2.  Copy the string from the command line to the one that gets sent to
the C function.

Which leads back to the largely-ignored original question:

Would it be unreasonable to allow C_Kind for the character arguments of
Get_Command_Argument and Get_Environment_Variable?





More information about the J3 mailing list