PB does not use Methods or Functions, what would you use instead Procedures?
This may seam like a stupid question but it seams strange.
Method & Functions
-
- Enthusiast
- Posts: 202
- Joined: Sat Feb 18, 2012 10:21 pm
- Location: Leicestershire
Method & Functions
P.N.
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: Method & Functions
Yes, you would use Procedures.Pot Noodle wrote:PB does not use Methods or Functions, what would you use instead Procedures?
This may seam like a stupid question but it seams strange.
If you are coming from a C or C++ background then a Procedure is the exact replacement for a function.
You can use a Procedure to implement a method, since they are just functions which take a hidden pointer to the object that the method is being called on. You can use Interfaces to implement objects/classes with methods.
If you want other OO features you can find examples on the forum but it's not natively supported in PureBasic.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)