read_define.m
SYNTAX: d = read_define(filename,v)
PURPOSE: read all instances of #define in a file
INPUT: filename, file name including path and extension
v, structure with variables required to evaluate define statements,
e.g. v.CMD_BITS2VOLTS = 10/2047
OUTPUT: d, structure with fields set to values defined in the file
RESTRICTIONS: assumes one space between #define and name in the file
define statements must be terminated with line-feed or /*
define statements that can't be evaluated are ignored
fields in v named: i,j,k,m,n,p,s, are clobbered
Dependencies