Debian Codegraph @

Docs/src/int.but

raw
1 \S1{intinst} Integer Support
2
3 \S2{intfmt} IntFmt
4
5 \c user_var(output) format numberstring
6
7 Formats the number in "numberstring" using the format "format", and sets the output to user variable $x. The format string supports the same syntax as \W{https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-wsprintfw}{wsprintf} except that the \cw{I[32|64]} length fields and the \cw{p} type are not supported. Example format strings include "%08X" and "%u".
8
9 \c IntFmt $0 "0x%08X" 195948557
10 \c IntFmt $1 "%c" 0x41
11
12 \S2{int64fmt} Int64Fmt
13
14 \c user_var(output) format numberstring
15
16 Supports the \cw{I} and \cw{I64} length fields and the \cw{p} type in addition to the syntax supported by \cw{IntFmt}.
17
18 \NsisFuncReq64
19
20 \c Int64Fmt $0 "%I64x" 244837743786702
21
22 \# InternalNote: There is no IntPtrFmt instruction because "%p" is 2000+ and "%Ix" is XP+. Consequently, all code needs to check ${NSIS_PTR_SIZE}.
23
24 \S2{intop} IntOp
25
26 \c user_var(output) value1 OP [value2]
27
28 Combines value1 and (depending on OP) value2 into the specified user variable (\c{user_var}). OP is defined as one of the following:
29
30 \b \e{+} ADDs value1 and value2
31
32 \b \e{-} SUBTRACTs value2 from value1
33
34 \b \e{*} MULTIPLIEs value1 and value2
35
36 \b \e{/} DIVIDEs value1 by value2
37
38 \b \e{%} MODULUSs value1 by value2
39
40 \b \e{|} BINARY ORs value1 and value2
41
42 \b \e{&} BINARY ANDs value1 and value2
43
44 \b \e{^} BINARY XORs value1 and value2
45
46 \b \e{<<} LEFT SHIFTs value1 by value2
47
48 \b \e{>>} ARITHMETIC RIGHT SHIFTs value1 by value2
49
50 \b \e{>>>} LOGICALLY RIGHT SHIFTs value1 by value2
51
52 \b \e{~} BITWISE NEGATEs value1 (i.e. 7 becomes 4294967288)
53
54 \b \e{!} LOGICALLY NEGATEs value1 (i.e. 7 becomes 0)
55
56 \b \e{||} LOGICALLY ORs value1 and value2
57
58 \b \e{&&} LOGICALLY ANDs value1 and value2
59
60 \c IntOp $0 1 + 1
61 \c IntOp $0 $0 + 1
62 \c IntOp $0 $0 << 2
63 \c IntOp $0 $0 ~
64 \c IntOp $0 $0 & 0xF
65
66 \S2{intptrop} IntPtrOp
67
68 \c user_var(output) value1 OP [value2]
69
70 Combines value1 and (depending on OP) value2 into the specified user variable (\c{user_var}). OP is the same list of operators as supported by \c{IntOp}.
71
72 \c IntPtrOp $FieldAddress $MyBuffer + $FieldOffset