Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.powerbasic > #7 > unrolled thread
| Started by | Olav <invalid.is.my@email.nn> |
|---|---|
| First post | 2011-09-04 22:13 +0200 |
| Last post | 2012-02-14 16:25 -0500 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.lang.basic.powerbasic
Macro from C/C++ to PB Olav <invalid.is.my@email.nn> - 2011-09-04 22:13 +0200
Re: Macro from C/C++ to PB Peter Manders <usenet@mandersDELETE.DELETEorg> - 2011-09-06 00:32 +0200
Re: Macro from C/C++ to PB Olav <invalid.is.my@email.nn> - 2011-09-06 08:51 +0200
Re: Macro from C/C++ to PB Peter Manders <usenet@mandersDELETE.DELETEorg> - 2011-09-06 19:33 +0200
Re: Macro from C/C++ to PB GS <gs@somewhere.net> - 2012-02-14 16:25 -0500
| From | Olav <invalid.is.my@email.nn> |
|---|---|
| Date | 2011-09-04 22:13 +0200 |
| Subject | Macro from C/C++ to PB |
| Message-ID | <4e63dbc9$1@proxy.mimer.no> |
How can C/C++ statements like
#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#ENDIF
#define IDD_DIALOG1 100
be converted PB using a macro?
Thanks in advance!
--
[toc] | [next] | [standalone]
| From | Peter Manders <usenet@mandersDELETE.DELETEorg> |
|---|---|
| Date | 2011-09-06 00:32 +0200 |
| Message-ID | <MPG.28cf6c6b9a92a08698970f@newszilla.xs4all.nl> |
| In reply to | #7 |
In article <4e63dbc9$1@proxy.mimer.no>, invalid.is.my@email.nn says... > > How can C/C++ statements like > > #ifndef IDC_STATIC > #define IDC_STATIC (-1) > #ENDIF > > #define IDD_DIALOG1 100 > > be converted PB using a macro? > > Thanks in advance! It's explained in the help file under %Def() -- Peter Manders. Wise men talk because they have something to say, fools because they have to say something. (Plato)
[toc] | [prev] | [next] | [standalone]
| From | Olav <invalid.is.my@email.nn> |
|---|---|
| Date | 2011-09-06 08:51 +0200 |
| Message-ID | <4e65c2f6@proxy.mimer.no> |
| In reply to | #8 |
Den 06.09.2011 00:32, skrev Peter Manders: > In article<4e63dbc9$1@proxy.mimer.no>, invalid.is.my@email.nn says... >> >> How can C/C++ statements like >> >> #ifndef IDC_STATIC >> #define IDC_STATIC (-1) >> #ENDIF >> >> #define IDD_DIALOG1 100 >> >> be converted PB using a macro? >> >> Thanks in advance! > > It's explained in the help file under %Def() > Yes, thank you. I know how to rewrite these statements to PB equivalent statements, but that was not what I was asking for. I was looking for a solution where these C/C++ directives could be placed within a PB macro, so that the compiler would be able to cope with them. If so both the resource compiler and the PB compiler could use the same header file. Since a macroname can't start with a #, it looks to me that it isn't possible to do what I had in mind, so I asked in case there was a solution to it though. And I can't find such a soulution to it in the help file. Thanks for your time! --
[toc] | [prev] | [next] | [standalone]
| From | Peter Manders <usenet@mandersDELETE.DELETEorg> |
|---|---|
| Date | 2011-09-06 19:33 +0200 |
| Message-ID | <MPG.28d077c017f12016989713@newszilla.xs4all.nl> |
| In reply to | #9 |
In article <4e65c2f6@proxy.mimer.no>, invalid.is.my@email.nn says... > > Den 06.09.2011 00:32, skrev Peter Manders: > > In article<4e63dbc9$1@proxy.mimer.no>, invalid.is.my@email.nn says... > >> > >> How can C/C++ statements like > >> > >> #ifndef IDC_STATIC > >> #define IDC_STATIC (-1) > >> #ENDIF > >> > >> #define IDD_DIALOG1 100 > >> > >> be converted PB using a macro? > >> > >> Thanks in advance! > > > > It's explained in the help file under %Def() > > > > Yes, thank you. I know how to rewrite these statements to PB equivalent > statements, but that was not what I was asking for. > > I was looking for a solution where these C/C++ directives could be > placed within a PB macro, so that the compiler would be able to cope > with them. If so both the resource compiler and the PB compiler could > use the same header file. Since a macroname can't start with a #, it > looks to me that it isn't possible to do what I had in mind, so I asked > in case there was a solution to it though. And I can't find such a > soulution to it in the help file. I can't think of a solution for that either. There would have to be at least one precompiler directive that both could use. I don't know your exact objective, but you could use a batch file for conditional compilation, or to translate the C/C++ file on the fly right before compilation. I'm guessing you want to make sure that both compilers use the same include file, or at least the same constants that are defined in it. -- Peter Manders. Wise men talk because they have something to say, fools because they have to say something. (Plato)
[toc] | [prev] | [next] | [standalone]
| From | GS <gs@somewhere.net> |
|---|---|
| Date | 2012-02-14 16:25 -0500 |
| Message-ID | <jhejh7$6jl$1@dont-email.me> |
| In reply to | #9 |
Olav explained on 9/6/2011 : > Den 06.09.2011 00:32, skrev Peter Manders: >> In article<4e63dbc9$1@proxy.mimer.no>, invalid.is.my@email.nn says... >>> >>> How can C/C++ statements like >>> >>> #ifndef IDC_STATIC >>> #define IDC_STATIC (-1) >>> #ENDIF >>> >>> #define IDD_DIALOG1 100 >>> >>> be converted PB using a macro? >>> >>> Thanks in advance! >> >> It's explained in the help file under %Def() >> > > Yes, thank you. I know how to rewrite these statements to PB equivalent > statements, but that was not what I was asking for. > > I was looking for a solution where these C/C++ directives could be placed > within a PB macro, so that the compiler would be able to cope with them. If > so both the resource compiler and the PB compiler could use the same header > file. Since a macroname can't start with a #, it looks to me that it isn't > possible to do what I had in mind, so I asked in case there was a solution to > it though. And I can't find such a soulution to it in the help file. > > Thanks for your time! Don't know if this would be helpful... I'm primarily an MS Excel VBA developer who, on occasion, uses VB6 for some dev work. There are specific differences between Classic VB and VBA even though they implement the same syntax for coding. That means that if I want to share code modules (ergo storing only 1 file instead of 2) between the two I need to write separate lines for each discipline. Then I can just comment out the inappropriate lines before compiling. Fortunately, the compiler reminds me if I forget!<g> -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.basic.powerbasic
csiph-web