Re: Request: Integer Division

new topic     » goto parent     » topic index » view thread      » older message » newer message
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 smile

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu