inlined procedure

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by richard.

hi,

how about a procedure attribute "inlined", so that procedures will be expaned like macros at the place they are called. wold be a handy feature for use with threads.

richard
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

What do you mean exactly by "wold be a handy feature for use with threads." ? Inlined procedures are faster, it's the only advantage.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by richard.

for example you start a thread, think of a server, for a user. the user has to have access to a db. it would be nice to have non shared code (regular procedures) for the db. the db code i would still have to write only once, it could be inlined. that btw is an advantage of modula c++ etc.
as for being faster - sure i'd like that too.

richard
Post Reply