From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 14-AUG-1990 19:15:12.48
To:	MRGATE::"ARISIA::EVERHART"
CC:	
Subj:	Re: Help with setting symbols in C

Received:  by crdgw1.ge.com (5.57/GE 1.70)
	 id AA18940; Tue, 14 Aug 90 18:07:13 EDT
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Tue, 14 AUG 90 12:28:13 PDT
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA24543; Tue, 14 Aug 90 12:11:59 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 14 Aug 90 19:03:34 GMT
From: sdd.hp.com!zaphod.mps.ohio-state.edu!uwm.edu!srcsip!falcon!magnuson@ucsd.edu  (Randy Magnuson)
Organization: Honeywell S&RC, Minneapolis, MN
Subject: Re: Help with setting symbols in C
Message-Id: <86612@srcsip.UUCP>
References: <1990Aug14.164043.11305@morrow.stanford.edu>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

In article <1990Aug14.164043.11305@morrow.stanford.edu> LC.YRS@forsythe.stanford.edu (Richard Stanton) writes:
>If someone could mail me, or post, a small fragment of C code that
>sets 2 symbols, say, I'd be very grateful.

The following is an example of how to set a symbol from a C program:

+++++++++++++++++++++++++++++ CUT HERE ++++++++++++++++++++++++++++++
#include <descrip.h>

main ()
{
  char sym_name [] = "SymName";
  char sym_value [] = "SymValue";
  int status;

  $DESCRIPTOR (sym_name_desc, sym_name);
  $DESCRIPTOR (sym_value_desc, sym_value);

  status = LIB$SET_SYMBOL (&sym_name_desc, &sym_value_desc);
  return status;
}
-- Randy R. Magnuson
   magnuson@skyler.mavd.honeywell.com  (612-542-5052)
   magnuson@src.honeywell.com          (612-782-7677)

