TempleOSTS_131005.ISO
This commit is contained in:
1 parent
1343005a29
commit
2d2a65d572
547 files changed
+33608
-12549
No files matched your search
+22
-22
@@ -1,42 +1,42 @@
|
||||
class DStruct
|
||||
class FDStruct
|
||||
{
|
||||
//Use <CTRL-L> and select "Data" to generate the fmtstrs
|
||||
|
||||
//The number is the field from after the ':' to the end.
|
||||
// See $LK,"Data Tag Width","FA:::/TempleOS/Adam/Doc/DocPlain.CPP,DataTagWidth"$.
|
||||
|
||||
F64 num1 fmtstr "$$DA-T,32,\"F64 1:%12.8f\"$$\n";
|
||||
F64 num2 fmtstr "$$DA-T,32,\"F64 2:%12e\"$$\n";
|
||||
I64 num3 fmtstr "$$DA-T,32,\"I64 1:0x%016X\"$$\n";
|
||||
I64 num4 fmtstr "$$DA-T,32,\"I64 2:%12d\"$$\n";
|
||||
U8 name[32] fmtstr "$$DA-P,31,\"Name :%s\"$$\n";
|
||||
F64 num1 fmtstr "$$DA-T,32,\"F64 1:%12.8f\"$$\n";
|
||||
F64 num2 fmtstr "$$DA-T,32,\"F64 2:%12e\"$$\n";
|
||||
I64 num3 fmtstr "$$DA-T,32,\"I64 1:0x%016X\"$$\n";
|
||||
I64 num4 fmtstr "$$DA-T,32,\"I64 2:%12d\"$$\n";
|
||||
U8 name[32] fmtstr "$$DA-P,31,\"Name :%s\"$$\n";
|
||||
CDate datetime fmtstr "$$DA-T,32,\"Date :%8D\"$$\n";
|
||||
};
|
||||
|
||||
U0 FormDemo()
|
||||
{
|
||||
DStruct gtl;
|
||||
FDStruct fds;
|
||||
CDate cdt;
|
||||
|
||||
gtl.num1=12.3e-4; //Set defaults
|
||||
gtl.num2=4.5e3;
|
||||
gtl.num3=0x1234;
|
||||
gtl.num4=-567;
|
||||
StrCpy(>l.name,"John");
|
||||
cdt=GetCurTimeDate;
|
||||
gtl.datetime=cdt;
|
||||
if (DocFormDo(>l,"DStruct")) {
|
||||
"#1=%e\n",gtl.num1;
|
||||
"#2=%e\n",gtl.num2;
|
||||
"#3=%d\n",gtl.num3;
|
||||
"#4=%d\n",gtl.num4;
|
||||
"Name=%s\n",gtl.name;
|
||||
"Date=%D\n",gtl.datetime;
|
||||
fds.num1=12.3e-4; //Set defaults
|
||||
fds.num2=4.5e3;
|
||||
fds.num3=0x1234;
|
||||
fds.num4=-567;
|
||||
StrCpy(&fds.name,"John");
|
||||
cdt=GetDateTime;
|
||||
fds.datetime=cdt;
|
||||
if (DocFormDo(&fds)) {
|
||||
"#1=%e\n",fds.num1;
|
||||
"#2=%e\n",fds.num2;
|
||||
"#3=%d\n",fds.num3;
|
||||
"#4=%d\n",fds.num4;
|
||||
"Name=%s\n",fds.name;
|
||||
"Date=%D\n",fds.datetime;
|
||||
} else
|
||||
"Cancel\n";
|
||||
|
||||
"\n\nClassRep Example\n";
|
||||
ClassRep("DStruct",>l);
|
||||
ClassRep(&fds);
|
||||
|
||||
//See also $LK,"ClassRepD","MN:ClassRepD"$().
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user