Re: Request: Integer Division
- Posted by DerekParnell (admin) Jan 04, 2013
- 1248 views
jaygade said...
Ah, fair enough.
I'm neither in favor nor opposed to further increasing Euphoria's complexity by introducing a new operator.
Since I come from the old-school BASICs, I never had much problem with typing in
100 x = int(y/z)
Or the Euphoria equivalent. I can only say that explicitly specifying a function makes it clear to the interpreter and the reader that the intent is to do integer division. In that respect, it is preferable to the way that other languages handle this case.
Have you ever coded in COBOL?
DIVIDE y BY z WITH ROUNDING GIVING x.No function calls and no operators