Skip to content

A little doubt #3413

Answered by krakxn
itsabinashb asked this question in Q&A
Oct 22, 2022 · 2 comments · 10 replies
Discussion options

You must be logged in to vote

how we are knowing that it will store the index number??

Because the user, when seeking to use the functionality this function provides, will aptly provide the correct parameter. I.e. they will use the index in the first parameter here: callStoreFunction(uint256 _indexNumber, uint256 _simpleStorageNumber)

An example to illustrate how this works:

(Written in pseudo-code for illustration, ignore syntactical errors)

library useFunction { 
    function sum(uint256 numberOne, uint256 numberTwo) returns(uint256){
        memory uint256 total = 0;
        total = numberOne + numberTwo;
        return total
    }

contract useLibrary {
   // ignoring formalization of numbers...
   using useFunc…

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
10 replies
@itsabinashb
Comment options

@krakxn
Comment options

@itsabinashb
Comment options

@krakxn
Comment options

@itsabinashb
Comment options

Answer selected by alymurtazamemon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants