Preprocessor and MC++ 
Author Message
 Preprocessor and MC++

Hi,

Can I not use the preprocessor in mixed MC++ code for inserting chunks of
code like in Standard C++?

Cordially,

Dadi.



Sat, 14 Aug 2004 18:48:09 GMT  
 Preprocessor and MC++
Dadi,

Quote:
> Can I not use the preprocessor in mixed MC++ code for inserting chunks of
> code like in Standard C++?

I'm confused here... do you _want_ to use it, or not?

In any case, yes, you certainly can use the preprocessor... whether that's
the best choice or not is another question ;)

--
Tomas Restrepo



Sun, 15 Aug 2004 01:55:20 GMT  
 Preprocessor and MC++
Sorry about the confusing sentence there, but yeah I want to use it to
insert exception handling code.  That is, I want to use a macro for my catch
clauses which take up more space than the application code itself!  Id like
to have aspects for this repetitive code but hey... ;-)

It seems as if I just ran into a bug or something here because I was getting
errors on "throw;" expressions in the macro, and when I removed the "throw;"
lines the errors vanished.  Later on, though, I added those lines to the
macro again and then it all worked???  Now, more strangeness ensued because
I added another macro, also using "throw;" expressions, and got errors on
that one even though the first macro uses the same constructs and is right
above the second macro in a .h file???  So now I have one macro with a
"throw;" line that works and another also with a "throw;" line that doesnt!
If Im not terribly mistaken this must be some sort of bug!!?!?

Regards,
Dadi.



Quote:
> Dadi,

> > Can I not use the preprocessor in mixed MC++ code for inserting chunks
of
> > code like in Standard C++?

> I'm confused here... do you _want_ to use it, or not?

> In any case, yes, you certainly can use the preprocessor... whether that's
> the best choice or not is another question ;)

> --
> Tomas Restrepo




Sun, 15 Aug 2004 20:13:37 GMT  
 Preprocessor and MC++
Dadi,

Quote:
> It seems as if I just ran into a bug or something here because I was
getting
> errors on "throw;" expressions in the macro, and when I removed the
"throw;"
> lines the errors vanished.  Later on, though, I added those lines to the
> macro again and then it all worked???  Now, more strangeness ensued
because
> I added another macro, also using "throw;" expressions, and got errors on
> that one even though the first macro uses the same constructs and is right
> above the second macro in a .h file???  So now I have one macro with a
> "throw;" line that works and another also with a "throw;" line that
doesnt!
> If Im not terribly mistaken this must be some sort of bug!!?!?

Can you post the definitions of said macros? Perhaps we can spot what's
causing trouble and maybe suggest a workaround or confirm it is a bug?

--
Tomas Restrepo



Mon, 16 Aug 2004 01:40:11 GMT  
 Preprocessor and MC++
Dadi,

Quote:
> The first macro in the file is the one that didnt work, but now does and
> the second one just plain doesnt work!
> The code is written in Icelandic but that shouldnt be that much of a
bother
> ;-)

I can't spot anything obviously wrong... What I'd do next is compike the
code with the /EP or /P switch to dump the preprocessed code to stdout or a
file so that I coulkd examine exactly what the preprocessor is doing... that
might give you a hint as to what's going on...

--
Tomas Restrepo



Tue, 17 Aug 2004 03:05:50 GMT  
 Preprocessor and MC++

Quote:
> The first macro in the file is the one that didnt work, but now does and
> the second one just plain doesnt work!
> The code is written in Icelandic but that shouldnt be that much of a
bother
> ;-)
> catch(SBSFravik*)\
> {\
>    throw;\
            ^
> }\

There is a spurious space character at the end of the problematic "throw;\"
line.  Remove it.

t.x.



Fri, 20 Aug 2004 00:47:11 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. mc++ causes designer problems

2. Is const for value references obsolete in mc++?

3. Any chance making ConditionalAttribute work with mc++

4. ngen:ed mc++ dll stops working!

5. mc++ causes designer problems

6. Security for mc++ apps

7. finding app path in mc++ application ?

8. is there 'intsanceof' equivalent in mc++

9. A couple mc++ questions ?

10. mc++: how to iterate over values of a SortedList??

11. eh? Adding a new mc++ class doesn't make sense !

12. how can i export one class library from c# to mc++?

 

 
Powered by phpBB® Forum Software