sds_setvar

int sds_setvar (const char *sysvar, const struct sds_resbuf *result);


Set this variable to this value.


This function sets an IntelliCAD® 2001 system variable to a new value.

The argument sysvar represents the system variable whose value is to be set.

The result argument is the new value for the above variable.

This function returns RTNORM or RTERROR.

Example

char sysvar[512];

struct sds_resbuf rb1;

sds_getstring(0,"\nEnter a variable name: ",sysvar);

sds_getvar(sysvar,&rb1);

switch(rb1.restype){

. . .

case RTREAL:

sds_printf("\n %s is currently %f. ",sysvar,rb1.resval.rreal);

sds_getreal("\nEnter a new real number: ",&rb1.resval.rreal);

sds_setvar(sysvar,&rb1);

sds_printf("\n%s is now set at %f. ",sysvar,rb1.resval.rreal);

break;

. . .

}

Tell me about...

Programming Overview of LISP (LISt Processing) Language

sds_getvar