TempleOSCDV4.03.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:47:01 +02:00
1 parent 1541d7328d
commit 0f1a4a5d65
115 files changed
+5618 -4863

No files matched your search

+15 -8
View File
@@ -4,13 +4,15 @@ class FDStruct
//The number is the field from after the ':' to the end.
//See $LK,"Data Tag Width",A="FA:::/Adam/DolDoc/DocPlain.CPP,DataTagWidth"$.
F64 num1 fmtstr "$$DA-TRM,32,RT=F64,A=\"F64 1:%12.8f\"$$\n";
F64 num2 fmtstr "$$DA-TRM,32,RT=F64,A=\"F64 2:%12e\"$$\n";
I64 num3 fmtstr "$$DA-TRM,32,A=\"I64 1:0x%016X\"$$\n";
I64 num4 fmtstr "$$DA-TRM,32,A=\"I64 2:%12d\"$$\n";
F64 num1 fmtstr "$$DA-TRM,RT=F64,A=\"F64 1:%12.8f\"$$\n";
F64 num2 fmtstr "$$DA-TRM,RT=F64,A=\"F64 2:%12e\"$$\n";
I64 num3 fmtstr "$$DA-TRM,A=\"I64 1:0x%016X\"$$\n";
I64 num4 fmtstr "$$DA-TRM,A=\"I64 2:%12d\"$$\n";
I64 type fmtstr "$$LS,D=\"ST_PERSON_TYPE\"$$\n";
U8 name[32] fmtstr "$$DA-P,31,A=\"Name :%s\"$$\n";
CDate datetime fmtstr "$$DA-TRM,32,A=\"Date :%8D\"$$\n";
U8 name[32] fmtstr "$$DA-P,LEN=31,A=\"Name :%s\"$$\n";
U8 *address1 fmtstr "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
U8 *address2 fmtstr "$$DA+M,A=\"Address:%s\"$$\n"; //+M is unlimited len U8 *.
CDate datetime fmtstr "$$DA-TRM,A=\"Date :%8D\"$$\n";
Bool check fmtstr "$$CB,\"Check\"$$\n";
};
@@ -18,12 +20,14 @@ U0 FormDemo()
{
FDStruct fds;
DefineLstLoad("ST_PERSON_TYPE","Child\0Teen\0Adult\0");
fds.num1=12.3e-4; //Set defaults
fds.num1=12.3e-4; //Set defaults
fds.num2=4.5e3;
fds.num3=0x1234;
fds.num4=-567;
fds.type=1;
StrCpy(&fds.name,"John");
fds.address1=StrNew("1234 Pine St.");
fds.address2=NULL; //Init to NULL if empty.
fds.datetime=Now;
fds.check=TRUE;
if (DocForm(&fds)) {
@@ -33,6 +37,8 @@ U0 FormDemo()
"#4\t=%d\n",fds.num4;
"Type\t=%s\n",DefineSub(fds.type,"ST_PERSON_TYPE");
"Name\t=%s\n",fds.name;
"Address1=%s\n",fds.address1;
"Address2=%s\n",fds.address2;
"Date\t=%D\n",fds.datetime;
"Check\t=%d\n",fds.check;
} else
@@ -40,7 +46,8 @@ U0 FormDemo()
"\n\nClassRep Example\n";
ClassRep(&fds);
Free(fds.address1);
Free(fds.address2);
//See also $LK,"ClassRepD",A="MN:ClassRepD"$().
}