Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/ttcomtester/tests/sprintf2.ttl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10521 - (show annotations) (download)
Fri Jan 20 16:03:38 2023 UTC (13 months, 2 weeks ago) by zmatsuo
File size: 892 byte(s)
add communication test tool
1 sprintf '%+012d' 1
2 if result = 0 then
3 messagebox inputstr 'd'
4 else
5 int2str buf result
6 messagebox buf 'error'
7 endif
8
9 sprintf '%8d' 1
10 if result = 0 then
11 messagebox inputstr 'd'
12 else
13 int2str buf result
14 messagebox buf 'error'
15 endif
16
17 sprintf '%#x' 1
18 if result = 0 then
19 messagebox inputstr 'x'
20 else
21 int2str buf result
22 messagebox buf 'error'
23 endif
24
25 sprintf '%#X' 1
26 if result = 0 then
27 messagebox inputstr 'X'
28 else
29 int2str buf result
30 messagebox buf 'error'
31 endif
32
33 sprintf '%s' 'a'
34 if result = 0 then
35 messagebox inputstr 's'
36 else
37 int2str buf result
38 messagebox buf 'error'
39 endif
40
41 sprintf '%.10f' 1
42 if result = 0 then
43 messagebox inputstr 'd'
44 else
45 int2str buf result
46 messagebox buf 'error'
47 endif
48
49 sprintf '%e' 1
50 if result = 0 then
51 messagebox inputstr 'e'
52 else
53 int2str buf result
54 messagebox buf 'error'
55 endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26