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.


That makes no sense at all. "Regular" variables do not have methods. More importantly "regular" variables that are actually an object cannot access methods.


It makes perfect sense. In theory, maybe the explination is lacking the mikkel level of googled encrusted authority, but still, a string allows you to do string 'concentration'(Subject to correct spelling.)

Typically, in C++ to achieve this on a string class you'd use Operator overloading, and in effect write a function is called to perform the 'logic' of the operator.
BlitzMax is obviously doing this for real on strings(Since as you say, they are objects) or is merely faking it(In the sense it's not an overloaded operator)
If it's not faking it, i'd like the functionality exposed to us, so we can write our own. It's...useful.