![]() |
.. (לתיקייה המכילה) | |
Can we assume a limit on the number of parameters to a function?
|
You may assume that the number of parameters + number of local variables in a function will not surpass 50
|
What should we do in case of an error? for example a type mismatch
|
In this case, you should not print code to the output. instead, you should print a single line showing the error as done in hw3
for example. the following program: void f(){ int x; } void main() { return 7; } The expected output is: line 6: type mismatch |
Which division should we use? sdiv or udiv?
|
Use sdiv
|
What should we do in the following case:
int f() {
int x;
}
the function is supposed to return an integer but does not return any value
|
You can assume that every function that has a return type will return a value
Cases like this won't be given in the tests |
In the Parents' version of the homework, what should we print in case of division by zero? There is no print function for strings in the HW.
|
Print the number 0 instead. Then stop the program's execution.
|

