double mint... two module wishlist...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

double mint... two module wishlist...

Post by jassing »

Modules seperate a lot out (constants, structures, variables, etc) from "the program" and "the module" - include files should also be counted separately... ie: xincludefile should not know about xincludefiles outside of the module (and visa-versa); likewise, includefile in a module should not affect xincludefile outside of the module (and visa-versa)

I use a lot of modules & shared source files (procedures/headers) and seem to bump into compatibility problems with this.

Can we have a #pb_compiler_in_module to know when an include file is w/in a module?
Reason is I had a few files that were also part of a DLL, so they had "procedureDLL" in them, but when included in a module, this generates an error.
Less appealing is to allow ProcedureDLL in a module, but just treat it as a regular procedure. I think there would be value added knowing if an include file is w/in a module or not, not just for procedure definitions.
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: double mint... two module wishlist...

Post by STARGÅTE »

Compiler Directives
#PB_Compiler_Module : Current module name, if the line is inside a module.
#PB_Compiler_IsIncludeFile : Set to 1 if the file being compiled has been included by another file, set to 0 else.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: double mint... two module wishlist...

Post by jassing »

I'll give it another try. When I did it; and include file didn't know it was in a module. (ie : #Pb_compiler_module="") Maybe it was a glitch...
thanks.
Post Reply