Ethereum contract function result return
Yes, refer to the interaction between contracts. Digital currency exchange platform for example, I am trying to sign a smart contract from another factory contract and then redeploy the address of the new smart contract. However, the address it returns is the transaction hash, not the contract address. I believe this is because when the address is returned, the contract has not been exploited. When I deploy the smart contract with Web3, it seems that it will not output the contract address until the smart contract is deployed
I haven't touched it
according to the report, Zhejiang blockchain government platform is mainly engaged in blockchain bills, especially medical bills. The public platform of Changsha's SMIC blockchain mainly focuses on government information disclosure, government affairs handling, intellectual property protection, judicial expertise, finance and so on, but it has not involved the medical bills yet.
Function return refers to the return value, which is the result of a function. The reason for returning is that if you need to get the processing result of the function in the program for further processing, you need the function to have a return value. The return value of a function is defined by return,
the format is: return value
1. Return is the sign of the end of a function. There can be multiple returns in the function, but the whole function will end if it is executed once
2. The return value of return has no type limit, that is, it can be any data type
3. There is no limit on the number of return values, that is, multiple values of any type can be separated by commas
extended data:
working principle of return
so when the called function finishes running, the return value after return is really released. Finally, the value is returned to the calling function through this temporary variable. In addition, the return value type specified when defining a function is actually the type of the temporary variable
tkfiledialog. Askopenfile (), please try it. If there is also reading, take a closer look at the read file function in Python. I used wxPython, which has a file selection control.
-
use return to return the result to the place where this function is called.
-
can return a pointer to the structure, so as to return multiple values. This method is not very safe, or define a global variable, change its value directly in the sub function, or an official common way is as follows:
< pre t = "code" L = "CPP" > #include & lt; stdio.h>< br />#include< stdlib.h>< br />structPOINT
{
intx;< br /> inty;< br />};< br />
voidfun(structPOINT*p)
{
p-> x=5;< br /> p-> y=8;< br />}
intmain()
{
structPOINTpt;< br /> fun(& pt);// Define a structure variable input function to receive results, which is equivalent to returning multiple values
printf(" pt.x=%dpt.y=%d", pt.x,pt.y);< br /> return0;< br />}
= SUMIF! D: D, debt statistics! D4, pay in freight! E:E)
