User guide

19-9
sparsematrix emptysparsematrix
structure 1x1structurecontainingemptyand/orzeroedout
members
Inordertodeclarestructuresina.decfile,youmust#includethefile(s)con-
tainingthedefinitionsofthetypesofstructuresthatyouwishtodeclareatthetopof
your.decfile.Forexample,ifyouhavethefollowingstructuretypedefinitioninafile
calledmystruct.sdf:
struct mystruct {
matrix m;
array a;
scalar scal;
string array sa;
};
Youcoulddeclareaninstanceofthatstructuretype,calledms,ina.decfileasfol-
lows:
#include mystruct.sdf
declare struct mystruct ms;
SeedeclareintheCOMMANDREFERENCEformoreinformation.
Afilewitha.extextensioncontainingthesamesymbolsinexternalstatements
canalsobecreatedand#include'datthetopofanyfilethatreferencestheseglobal
variables.Anappropriatelibraryfileshouldcontainthenameofthe.decfilesandthe
namesoftheglobalstheydeclare.Thisallowsyoutoreferenceglobalvariablesacross
sourcefilesinanapplication.
Hereisanexamplethatillustratesthewayinwhich.dec,.ext,.lcgand.src
filesworktogether.Alwaysbeginthenamesofglobalmatricesorstringswith'_'todis-
tinguishthemfromprocedures.
.srcFile:
Libraries