Skip to content

While or For Loop in function #2524

Answered by cpitclaudel
dreamqin68 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,

while and forall statements are not supported in functions — in fact, no statements are! Function bodies can only use expressions (that and the fact that methods are opaque are the main differences between functions and methods).

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@MikaelMayer
Comment options

@dreamqin68
Comment options

Answer selected by dreamqin68
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants