Alias keyword

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 freak.

> But the pre-compiler program can do the same: save the compiler program ProcessID and make it
> a child process. When the editor closes the pre-compiler, compiler will also close, won't it?

No, it won't.
First:
The Editor ends the Compiler with 'TerminateProcess' which means, that this 'fake'Compiler won't have any time to close the 'real' Compiler by itself (for example with another TerminateProcess call).

Second:
the Compiler being a Child Process of this 'fake'Compiler doesn't mean, it is closed, if it's parent is closed. This only means, that the Parent Process can share some stuff like Environmental Variables an such.
From Microsoft Platform SDK (about TerminateProcess)
Terminating a process does not cause child processes to be terminated.
You see, if the Editor uses TreminateProcess to close your 'fake' Compiler, the 'real' Compiler keeps running.

Timo
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 TheBeck.
The Editor ends the Compiler with 'TerminateProcess' which means, that this 'fake'Compiler won't have any time to close the 'real' Compiler by itself (for example with another TerminateProcess call).
You can start a third process to monitor when the editor closes your pre-compiler process and closes the real compiler and it's self.

Their is an answer for everything.

This is NOT a very good idea!
Hacking is always a good idea. :)
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 freak.

> Hacking is always a good idea.

LOL

I know, there is a solution for everything. But i would prefer a more clean solution like an Option for the Tools-Menu. Something like 'Run before compilation'.

Timo
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 Danilo.

> Something like 'Run before compilation'.

And 'Run after compilation' to run UPX for example... :)

cya,
...Danilo
(registered PureBasic user)
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 PB.

> And 'Run after compilation' to run UPX for example... :)

YES! Please, somebody add these!
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 geoff.

Any code would have to be translated by the pre-compiler into standard PureBasic
to be understood on this Forum. Equally, any user of non standard commands
would have to be familiar with standard commands to understand the exapmles
posted on this Forum. So he would need to learn the Purebasic standard commands
anyway.

Why not write a text to text conversion program to convert your old programs
to Purebasic, then start using standard Purebasic commands?

This Forum works so well because we all use the same language (English) and
present our code in the same language (Purebasic). Why make things more
complicated than they need be?
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 vanleth.

Macros is good for crossplatform issues, where you need access to native OS commands. With them you can define a global command for something that varies from every OS platform PB supports.

I don't think it will change the way we generel speak in code terms on this forum.

My thoughts.
Van
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.

Macro will be done with PB 4.0.

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 TheBeck.

Fred,

Will there be any more releases of 3.x or will 4.0 be the next release?
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 Berikco.

I think i read a line 3.60 somewhere, maybe on IRC :)

Here also viewtopic.php?t=4953">http://forums.pur ... ebasic.htm
Post Reply