I found myself in the situation where I needed to use the fmod() function in a BASIC program. As far as I know, BBC BASIC doesn't have fmod, so I (as far as I knew) needed to implement it myself. This is what I came up with:

Code: Select all

```
DEF FNfmod( a, b )
b=ABSb*SGNa
=a-b*INT(a/b)
```

DBZ FOREVER!!! !!! !!! !!!