Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /branches/ttcomtester/tests/sprintf.ttl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10521 - (hide annotations) (download)
Fri Jan 20 16:03:38 2023 UTC (14 months, 3 weeks ago) by zmatsuo
File size: 2764 byte(s)
add communication test tool
1 maya 6353 sprintf ':%c:%4c:%04c:%-4c:%-04c:%+c:% c:' 49 50 51 52 53 54 55
2     if result = 0 then
3     messagebox inputstr 'c'
4     else
5     int2str buf result
6     messagebox buf 'error'
7     endif
8    
9     sprintf ':%d:%4d:%04d:%-4d:%-04d:%+d:% d:' 1 2 3 4 5 6 7
10     if result = 0 then
11     messagebox inputstr 'd'
12     else
13     int2str buf result
14     messagebox buf 'error'
15     endif
16    
17     sprintf ':%i:%4i:%04i:%-4i:%-04i:%+i:% i:' 1 2 3 4 5 6 7
18     if result = 0 then
19     messagebox inputstr 'i'
20     else
21     int2str buf result
22     messagebox buf 'error'
23     endif
24    
25     sprintf ':%o:%4o:%04o:%-4o:%-04o:%+o:% o:' 4 5 6 7 8 9 10
26     if result = 0 then
27     messagebox inputstr 'o'
28     else
29     int2str buf result
30     messagebox buf 'error'
31     endif
32    
33     sprintf ':%u:%4u:%04u:%-4u:%-04u:%+u:% u:' 1 2 3 4 5 6 7
34     if result = 0 then
35     messagebox inputstr 'u'
36     else
37     int2str buf result
38     messagebox buf 'error'
39     endif
40    
41     sprintf ':%x:%4x:%04x:%-4x:%-04x:%+x:% x:' 9 10 11 12 13 14 15
42     if result = 0 then
43     messagebox inputstr 'x'
44     else
45     int2str buf result
46     messagebox buf 'error'
47     endif
48    
49     sprintf ':%X:%4X:%04X:%-4X:%-04X:%+X:% X:' 9 10 11 12 13 14 15
50     if result = 0 then
51     messagebox inputstr 'X'
52     else
53     int2str buf result
54     messagebox buf 'error'
55     endif
56    
57     sprintf ':%s:%4s:%04s:%-4s:%-04s:%+s:% s:' 'a' 'b' 'c' 'd' 'e' 'f' 'g'
58     if result = 0 then
59     messagebox inputstr 's'
60     else
61     int2str buf result
62     messagebox buf 'error'
63     endif
64    
65     sprintf '%%:%p'
66     if result = 0 then
67     messagebox inputstr ''
68     else
69     int2str buf result
70     messagebox buf 'error'
71     endif
72    
73    
74     sprintf '%c' 'a'
75     if result = 0 then
76     messagebox inputstr ''
77     else
78     int2str buf result
79     messagebox buf 'error'
80     endif
81    
82     sprintf '%d' 'a'
83     if result = 0 then
84     messagebox inputstr ''
85     else
86     int2str buf result
87     messagebox buf 'error'
88     endif
89    
90     sprintf '%i' 'a'
91     if result = 0 then
92     messagebox inputstr ''
93     else
94     int2str buf result
95     messagebox buf 'error'
96     endif
97    
98     sprintf '%o' 'a'
99     if result = 0 then
100     messagebox inputstr ''
101     else
102     int2str buf result
103     messagebox buf 'error'
104     endif
105    
106     sprintf '%u' 'a'
107     if result = 0 then
108     messagebox inputstr ''
109     else
110     int2str buf result
111     messagebox buf 'error'
112     endif
113    
114     sprintf '%x' 'a'
115     if result = 0 then
116     messagebox inputstr ''
117     else
118     int2str buf result
119     messagebox buf 'error'
120     endif
121    
122     sprintf '%X' 'a'
123     if result = 0 then
124     messagebox inputstr ''
125     else
126     int2str buf result
127     messagebox buf 'error'
128     endif
129    
130     sprintf '%s' 49
131     if result = 0 then
132     messagebox inputstr ''
133     else
134     int2str buf result
135     messagebox buf 'error'
136     endif
137    
138     sprintf '%=d' 32
139     if result = 0 then
140     messagebox inputstr ''
141     else
142     int2str buf result
143     messagebox buf 'error'
144     endif
145    
146     sprintf
147     if result = 0 then
148     messagebox inputstr ''
149     else
150     int2str buf result
151     messagebox buf 'error'
152     endif

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