here is my FunC code: C-like forall X -> int is_null (X x) asm "ISNULL"; forall X -> (tuple, ()) push_back (tuple tail, X head) asm "CONS"; forall X -> (tupl...
What happens if we verify the source code in the explorer, but the contract's code gets updated using set_code() instruction? Does the verified source code d...
one year ago
Do I get it right that there is no implementation of a floating-point numbers type such as float in FunC? --- > This question was imported from Telegram Chat...
FunC language evolves and gets new versions. But there seems to be no release notes for those versions on the TON website and FunC doesn't have its own websi...
I've previously seen tilde symbol used for bitwise NOT in other programming languages, so placing ~ before some X means "not X". But it seems in FunC it work...
one year ago
The TON documentation states that "a variable can be dumped to the debug log by the ~dump function". But where exactly it that log? How can I see it? --- > T...
one year ago
Is there a conventional way to concatenate two strings using FunC? --- > This question was imported from Telegram Chat: https://t.me/tondev/130472
one year ago
I remember there was a function equal_slices in stdlib for comparing two slices, but now at compilation time I get an error saying such a function does not e...
In modular arithmetic there is such a thing as modular multiplication. Does it have a built-in support in FunC? --- > This question was imported from Telegra...
one year ago
How can I print out something in FunC? https://t.me/tondev_eng/9305
one year ago
How do you hardcode an address in a smart contract? An example in both FunC would be helpful. https://t.me/tondev_eng/4099
one year ago
There are different approaches to division: * using floating-point numbers (so 23 / 4 = 5.75) * mathematical rounding (23 / 4 = 6 since it's the closest inte...
one year ago
How is a reference serialized (stored)? --- > This question was imported from Telegram Chat: https://t.me/tondev_eng/9475
Some programming languages have built-in functions like is_int() helping to check quickly if a specific variable is of type integer or not. Is there somethin...
one year ago
In Blueprint, we will need to write the Wrapper functions ourselves. More importantly, when we code the op code in our FunC code, we need to decode the strin...
According to the documentation, we find the commit() FunC code described as follows: Commits the current state of registers c4 (“persistent data”) and c5 (“a...
one year ago
Do I get it right that FunC treats int and (int) (a tuple with only one integer in it) as two different types even though they both are really integers? I ha...
one year ago
I found a strange behavior in func bitwise operation. I don't understand why. slice slice0 = begin_cell().store_coins(123).end_cell().begin_parse(); int resu...
What determines the purity of a function? A) It must only read the function parameters. B) It can read values outside of the function parameters and return a...
one year ago
Case 1: () recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure { slice cs = in_msg_full.begin_parse(); int flags = cs~lo...
one year ago
In the Ston.fi core contract GitHub repository (https://github.com/ston-fi/dex-core), there is a line of FunC code as shown below: force_chain(WORKCHAIN, sen...
one year ago
Suppose I have a slice that contains a string and I want to read it char by char. How do I do it? --- > This question was imported from Telegram Chat: https:...
How do we save an ordinary string in FunC? For example, how do you store the text "A" without making it a slice? --- > This question was imported from Telegr...
I've been trying to do the following using the uncons function, but it doesn't destructure as I expect it to: (var l, var rvalues) = uncons(values); --- > Th...
Do I get it right that if my smart contract needs to store a string longer than 1023 bits, I should split that thing in parts and make a chain of cells conta...
FunC standard library includes Lisp-style lists. TON documentation describes them and their basic functionality like adding an element to the beginning of a ...
one year ago
In TON software development, everything is a cell. Every cell can reference up to 4 other cells, creating a parent-child relationship. What if I have a speci...
Follow the docs there:https://ton.org/docs/develop/func/overview back by the code: () send_money(slice address, int amount) impure inline { var msg = begin_c...
Hello everyone, please explain: ```` () send_message_back(addr, ans_tag, query_id, body, grams, mode) impure inline_ref { ;; int_msg_info$0 ihr_disabled:Bool...
one year ago
Are there functions for working with dates in FunC? Is it possible to get the current date or something like that? --- > This question was imported from Tele...