Mod won't be modified because QB64 is dedicated to being QuickBASIC compatible with the goal being programs will run the same, in terms of output, on both platforms.
I find the function for recognizing patterns good enough for any situation I have encountered. I just coded an even better update for integers with this single line not conditions needed update...
So to me this is not a pressing issue. I'd put it left down (as apposed to right up) there with making SELECT CASES, but you never know. If a current dev or someone new comes along who has a personal fascination with topic, something might get pushed to the repo.
My advice would be if you want to lobby for it, Since Steve doesn't appear interested, I'd recommend sending a PM to Matt (DSMan195276) or luke.
In conclusion, if MOD were buggy, I'm pretty certain the dev team would be all over it, but as I stated earlier the QB version of MOD works correctly as designed, and although there is absolute merit in an operator as you described, well, there are a lot of developed functions built into calculators that are not made as keywords in a computer language. That's why many of us build routines like String Math and decfloat.
Pete
I find the function for recognizing patterns good enough for any situation I have encountered. I just coded an even better update for integers with this single line not conditions needed update...
Code: (Select All)
$CONSOLE:ONLY
' Testing modx 5
FOR i = 20 TO -20 STEP -1
i$ = LTRIM$(STR$(i))
LOCATE , 4 - LEN(i$): PRINT LTRIM$(STR$(i));: LOCATE , 5: PRINT "modx j ="; modx(i, 5)
NEXT
SLEEP
' Testing modx -5
FOR i = 20 TO -20 STEP -1
i$ = LTRIM$(STR$(i))
LOCATE , 4 - LEN(i$): PRINT LTRIM$(STR$(i));: LOCATE , 5: PRINT "modx j ="; modx(i, -5)
NEXT
FUNCTION modx (i, j)
modx = (ABS(i) - ABS(j) * ((ABS(i) \ ABS(j)) + (1 - SGN(i)) \ 2)) * SGN(i MOD j)
END FUNCTION
So to me this is not a pressing issue. I'd put it left down (as apposed to right up) there with making SELECT CASES, but you never know. If a current dev or someone new comes along who has a personal fascination with topic, something might get pushed to the repo.
My advice would be if you want to lobby for it, Since Steve doesn't appear interested, I'd recommend sending a PM to Matt (DSMan195276) or luke.
In conclusion, if MOD were buggy, I'm pretty certain the dev team would be all over it, but as I stated earlier the QB version of MOD works correctly as designed, and although there is absolute merit in an operator as you described, well, there are a lot of developed functions built into calculators that are not made as keywords in a computer language. That's why many of us build routines like String Math and decfloat.
Pete