You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In https://docs.ton.org/develop/func/literals_identifiers#string-literals, it's stated that there are no multiline strings, which isn't true — all the same multiline strings from multiline assembly function definitions can be used in expressions. And they also have all the same "string types": s for slices of hex-encoded string contents, a for slices containing MsgAddressInt of address in string contents, etc.
The following just works:
;; somewhere inside of a function body
var a = """
hash me baby one more time
"""h;
var b = a + 42;
b; ;; 623173419
Describe the solution you'd like
Add description of multiline string literals :)
Additional context
While we're at it — Did you know, that Fift assembly function bodies can have sequences of both singleline and multiline string literals mixed? That is, the following is perfectly valid:
int inc_negate_inc(int x) asm "INC" """
NEGATE
""" "INC";
...which would increment the value on the stack by 1, negate it, then increment by 1 again and pop it, producing it as a result.
The text was updated successfully, but these errors were encountered:
novusnota
changed the title
Add description of multiline strings
(FunC) Add description of multiline strings
Aug 2, 2024
Is your feature request related to a problem? Please describe.
In https://docs.ton.org/develop/func/literals_identifiers#string-literals, it's stated that there are no multiline strings, which isn't true — all the same multiline strings from multiline assembly function definitions can be used in expressions. And they also have all the same "string types":
s
for slices of hex-encoded string contents,a
for slices containingMsgAddressInt
of address in string contents, etc.The following just works:
Describe the solution you'd like
Add description of multiline string literals :)
Additional context
While we're at it — Did you know, that Fift assembly function bodies can have sequences of both singleline and multiline string literals mixed? That is, the following is perfectly valid:
...which would increment the value on the stack by 1, negate it, then increment by 1 again and pop it, producing it as a result.
The text was updated successfully, but these errors were encountered: