Can I add a method to Int

BlitzMax Forums/BlitzMax Programming/Can I add a method to Int

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

But realize that a string is really a bunch of data behind the scenes: a length plus a pointer to a character array allocated elsewhere. An int is just a a raw 32-bit value.

The original example of "x.keepin(0,800)" is a classic case where you don't want OOP. All you want is"x = keepin(x,0,800)" or "keepin(x,0,800)" depending on whether you want to pass x by reference or value. In other words, just a function, not an object.