File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,8 @@ passed is to be formatted into the string.
273
273
274
274
The directives are:
275
275
276
+ = begin table
277
+
276
278
% a literal percent sign
277
279
c a character with the given codepoint
278
280
s a string
@@ -288,28 +290,42 @@ The directives are:
288
290
G like g, but with an uppercase "E" (if applicable)
289
291
b an unsigned integer, in binary
290
292
293
+ = end table
294
+
291
295
Compatibility:
292
296
297
+ = begin table
298
+
293
299
i a synonym for %d
294
300
D a synonym for %ld
295
301
U a synonym for %lu
296
302
O a synonym for %lo
297
303
F a synonym for %f
298
304
305
+ = end table
306
+
299
307
Perl 5 (non-)compatibility:
300
308
309
+ = begin table
310
+
301
311
n produces a runtime exception
302
312
p produces a runtime exception
303
313
314
+ = end table
315
+
304
316
Modifiers change the meaning of format directives, but are largely
305
317
no-ops (the semantics are still being determined).
306
318
319
+ = begin table
320
+
307
321
h interpret integer as native "short" (typically int16)
308
322
l interpret integer as native "long" (typically int32 or int64)
309
323
ll interpret integer as native "long long" (typically int64)
310
324
L interpret integer as native "long long" (typically uint64)
311
325
q interpret integer as native "quads" (typically int64 or larger)
312
326
327
+ = end table
328
+
313
329
Examples:
314
330
315
331
sprintf "%ld a big number, %lld a bigger number\n", 4294967295, 4294967296;
You can’t perform that action at this time.
0 commit comments