[comp.sys.amiga.programmer] "chip" in SAS C

a976@mindlink.UUCP (Ron Tarrant) (01/08/91)

> johnl@SDFSUN1.hac.com writes:
> 
> However, I do take exception regarding the error message.  The SAS/C error
> message, "Error 25: modifiable lvalue required", does indeed make sense, but
> in the same way as "syntax error" and is as helpful.  I'd much prefer
> something along the lines of "conflicting type modifier" or "storage class
> conflict."
> 
> -----------------------------------------------------------------------
> --------
> The crew faces deadly GURUs!  Next time on AmigaDOS: The Next Generation.
>         +--------+                      John Lee
>         | HUGHES |
>         +--------+                      ARPAnet: jhlee@hac2arpa.hac.com
>         Hughes Aircraft Company
> The above opinions are those of the user and not of those of this machine.


It took some real digging to find out what the h___ an lvalue was. Not having
the advantage of a BCSc, and finding no references to this word in _any_ book,
I pretty much had to beat my head against the screen for a few days until I
reached that state of bliss in which devine revelations come trickling in.
-Ron Tarrant
a976@Mindlink.UUCP

johnl@SDFSUN1.hac.com (John Lee) (01/09/91)

In article <1991Jan8.070945.7475@ux1.cso.uiuc.edu> lrg7030@uxa.cso.uiuc.edu (Loren  Rittle) writes:
>johnl@SDFSUN1.hac.com (John Lee) writes:
[...]
>> I still think the SAS/C error message is oblique.  I hate it when programs do 
>> that.
>
>No, that is not the rub :-).  SAS/C v5.10 (and the past few before it)
>fully supports the initialization of aggregate automatic variables as
>per the ANSI standard.  So, in other words, you don't know what you are
>talking about.  The reason, as stated in other messages, is that the chip
>and the auto (implied in this case) keywords are incompatible with one
>another.  If you know what an lvalue is the error message makes perfect
>sense, otherwise read pages 195-197 of K&R's second edition (Keep in mind
>that chip is a type qualifier).

Of course, how silly of me.  You can't have auto chip unless you can ensure
that the stack is entirely allocated in chip memory.  As for initialization
of auto aggregates, it's my UNIX C background.  ANSI C hasn't caught up to
BSD yet.

However, I do take exception regarding the error message.  The SAS/C error
message, "Error 25: modifiable lvalue required", does indeed make sense, but
in the same way as "syntax error" and is as helpful.  I'd much prefer 
something along the lines of "conflicting type modifier" or "storage class
conflict."

-------------------------------------------------------------------------------
The crew faces deadly GURUs!  Next time on AmigaDOS: The Next Generation.
	+--------+			John Lee
	| HUGHES |
	+--------+			ARPAnet: jhlee@hac2arpa.hac.com	
	Hughes Aircraft Company
The above opinions are those of the user and not of those of this machine.

etxtomp@eos.ericsson.se (Tommy Petersson) (01/09/91)

In article <1991Jan9.040641.5245@ux1.cso.uiuc.edu> lrg7030@uxa.cso.uiuc.edu (Loren  Rittle) writes:
>johnl@SDFSUN1.hac.com (John Lee) writes:
>> The SAS/C error
>> message, "Error 25: modifiable lvalue required", does indeed make sense, but
>> in the same way as "syntax error" and is as helpful.  I'd much prefer
>> something along the lines of "conflicting type modifier" or "storage class
>> conflict."
>
>On second thought, I completely agree with you (although, I still
>think that the error message is a bit more helpful than you do :-).
>But guess what, you can change the error message SAS/C presents to
>you without trying to convice SAS to make the change.  Here's how: Edit
>lc:lcerrs.txt.  Search for `modifiable lvalue required' and change
>to `modifiable lvalue required (conflicting type modifier)' or
>whatever you like.
>

...and just hope that the error message isn't used for anything else that
'modifiable lvalue required' is fuzzy enough for, but 'conflicting type
modifier' may be a plain lie...

>Loren J. Rittle
>--
>``In short, this is the absolute coolest computer device ever invented!''
>                   -Tom Denbo speaking about The VideoToaster by NewTek
>``Think about NewTek's VideoToaster!  Now think about the Amiga!''
>Loren J. Rittle lrg7030@uxa.cso.uiuc.edu

dick@woodwrk.LoneStar.ORG (Richard H. Wood) (01/13/91)

In article <4372@mindlink.UUCP>, Ron Tarrant writes:

> > johnl@SDFSUN1.hac.com writes:
> > 
> > However, I do take exception regarding the error message.  The SAS/C error
> > message, "Error 25: modifiable lvalue required", does indeed make sense, but
> 
> It took some real digging to find out what the h___ an lvalue was. Not having
> the advantage of a BCSc, and finding no references to this word in _any_ book,
>
> -Ron Tarrant
>

The term 'lvalue' is a common term in the C vernacular...I first saw it in K&R,
the "white book" (although I guess I've seen a lot of white books on C by others
at the local Book Stop recently).  It basically refers to a variable label:
i.e., one that refers to a bucket you can store stuff into - like an "int."  The
term comes from the variable's placement on an assignment statement.  An lvalue
is one that goes on the lefthand side of the equal sign; hence the term lvalue
(for LEFT value).
--
Richard H. Wood                      //          dick@woodwrk.LoneStar.ORG
246 Bancroft Drive East            \X/             uunet!digi!woodwrk!dick
Garland, Texas, 75040     "Become an ORGAN DONOR"          +1 214 530 2595
\/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/ \/\/