[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

884.0. "IMPM handling of Latin1string quotes" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Mon Apr 08 1991 20:22

If I enter this in a field in the SET window:

      attribute mumble  | "the desired value"
                        |____________________

...when I show that attribute with FCL I get:

      attribute mumble = """the desired value"""

...the ascii value of the string shows the first and last character as
   the quote character.

Although the quotes that the FCL requires aren't needed by the IMPM, they
get entered anyway. Could we get the IMPM to recognize leading/trailing
quotes and not include them in the value?
T.RTitleUserPersonal
Name
DateLines
884.1To quote or not to quoteVERNA::V_GILBERTTue Apr 09 1991 18:4611
Richard,

We had many discussions about latin1strings and the iconic map.  We finally
decided that the user should enter what he wants. Otherwise, if he really
wants quotes, he must enter "", etc.   

We certainly could put in additional code to strip off beginning and end
quotes, if that is the desired behavior, but we felt that the user should
simply enter what he wants.

Verna
884.2AM can enforce quote consistencyCOOKIE::KITTELLRichard - Architected Info MgmtTue Apr 09 1991 19:3924
RE: .1

Thanks Verna. I agree that a user will get used to the way the IMPM
does it. I know I do when I primarily use the windowing interface. These
things tend to bite me when I have to move back and forth between the
two PMs.

I'm sure you've been over the philosophical ground of "do we try to
keep the different PMs as consistent as possible, or let each of them
do what it does best?"

In this case, I can buy an argument that quotes are an unfortunate
side-effect of FCL needing syntax for parsing, and other PMs that are
syntax-free shouldn't have to clutter themselves with quotes.

On the other hand, my customers are going to be focused on media management,
and I don't think I'll be able to get their span of attention down to the
level of "command lines use quotes, windows don't". A small matter of
code in my routine that converts ILV can strip the quotes if they are
there.

It was worth asking to see if you'd do it for me... :-)

884.3VERNA::V_GILBERTWed Apr 10 1991 19:105
Richard,

It is certainly something that can be on a wishlist, but no promises.

Verna :-)
884.4works for me so far...COOKIE::KITTELLRichard - Architected Info MgmtWed Apr 10 1991 21:2232
This little segment sits in the routine that does all the ILV to descriptor
conversions. It just takes off enclosing quotes if they're there.

     case MCC_K_DT_LATIN1STRING:
        status = mcc_ilv_get (ctx, val_desc, reason);

        /*
         * Strip single leading and trailing quotes. This is because
         * it is easy to enter them to the Iconic interface, where they
         * aren't needed.
         */
        if (GOOD (status))
        {
            char  *string, *first, *last;

            string = val_desc->mcc_a_pointer;
            string[val_desc->mcc_w_curlen] = '\000';

            /* See if the first and last chars are quotes */
            if ((first = strchr (string, '"')) &&
                (last = strrchr (string, '"')) &&
                (first == string) &&
                (last == &string[val_desc->mcc_w_curlen - 1]))
            {
                val_desc->mcc_w_curlen -= 2;
                if (val_desc->mcc_w_curlen)
                    strncpy (string, &string[1], val_desc->mcc_w_curlen);
            }
        }

        break;