🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #23857

LSC prototypes question

#23857
From: Ted Johnson
Date: Tue, 19 Jan 1988 17:34
34 lines
1319 bytes
I have a short L.S. C question:  I have a function which is defined
as:

  void myfun(x, y)
  register int x, y;
  {
	...stuff...
   }

   and I tried to make a function prototype for it like this:

   void myfun(register int x, register int y);


   and I got the error message "invalid storage class".  However when I 
   removed the word "register" from the prototype, it compiled.  What's the
   deal?  Why isn't "register" a  valid storage class?  (I only have v.2.01
   of the documentation, and this error message wasn't in it...).

   Is it because prototypes just check TYPES of variables, and "register"
   isn't a type, it's a storage class?  But then the error message doesn't
   seem to make sense.  

   Could someone please give me a clue?  :-)

   -Ted

---------------------------------------------------
Ted Johnson
Hewlett-Packard, Design Technology Center
Santa Clara, CA
(408)553-3555
UUCP: ...hplabs!hpcea!hpcilzb!tedj
Technical Details
Message-ID: <870113@hpcilzb.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!hplabs!hpcea!hpcilzb!tedj

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!hplabs!hpcea!hpcilzb!tedj
From: tedj@hpcilzb.HP.COM (Ted Johnson)
Newsgroups: comp.sys.mac
Subject: LSC prototypes question
Message-ID: <870113@hpcilzb.HP.COM>
Date: 19 Jan 88 17:34:48 GMT
Organization: HP Design Tech Center - Santa Clara, CA
Lines: 34