Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!hpda!fortune!amd!decwrl!daemon From: daemon@decwrl.UUCP (The devil himself) Newsgroups: net.lang.c Subject: Using &LABEL Message-ID: <3480@decwrl.UUCP> Date: Thu, 30-Aug-84 09:55:23 EDT Article-I.D.: decwrl.3480 Posted: Thu Aug 30 09:55:23 1984 Date-Received: Sat, 1-Sep-84 14:20:57 EDT Organization: DEC Engineering Network Lines: 32 Using &LABEL___________________________________________________________________ > You can take the address of a label using "&foo". > By the way, is there anything useful you can do with this feature? > Use it as a function address? Assigned goto's??? Something else????? Good question. I never use goto's, so I never use labels. (I may use a goto someday, but so far I've never had to.) I could imagine horrible things like passing the address of a label to another function and executing a goto. Anyone who does that should probably be strung up by their thumbs. VMS RMS has a system function, sys$open(), that takes three arguments: (1) the address of a File Access Block (FAB), (2) the address of a user-written error completion routine (optional), and (2) the address of a user-written suc- cess completion routine (also optional). I thought I could use &LABEL to see if the "user-written routine" had to be a function or just an entry-point, but VAX C doesn't allow use of &LABEL. Perhaps someone out there running a different type of C on a VMS system could try it. Finally, is &LABEL an officially sanctioned K&R construct? I don't have my copy with me so I can't look it up right now... <_Jym_> :::::::::::::::: Jym Dyer ::::' :: `:::: Nashua, New Hampshire ::' :: `:: :: :: :: DYER%VAXUUM.DEC@DECWRL.ARPA :: .::::. :: {allegra|decvax|ihnp4|ucbvax}!decwrl!dec-rhea!dec-vaxuum!dyer ::..:' :: `:..:: ::::. :: .:::: Statements made in this article are my own; they might not :::::::::::::::: reflect the views of |d|i|g|i|t|a|l| Equipment Corporation.