Questions tagged [type-casting]

Type casting is the act of converting a value from one data type to another in a computer program.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
68 views

on the implicit type conversion rules in Solidity

Question in one sentence: Are there seperate implicit type conversion rules for function call resolution (other than the conversion rules for the remaining cases)? Regarding the array type ...
1
vote
1answer
30 views

Is there a need to check for null after casting?

Example: MyReceiver my = MyReceiver(_to); // To is an arbitrary address user provided my.someFunction(); // Do I need to check for my == null before calling? Strange enough I do ...
0
votes
1answer
435 views

Going from uint256 to uint8, is it possible?

I have a function that creates random numbers with a maximum value that you gives to it, the function was made to work with any uint256, and using % operator it returns a value between 0 and the ...