delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/30/08:05:41

Message-Id: <m0xmvfs-000S26C@inti.gov.ar>
Comments: Authenticated sender is <alex AT natacha DOT inti DOT gov DOT ar>
From: "Alex Lozano" <alex AT inti DOT gov DOT ar>
Organization: INTI - CITEI
To: Gary AT bbs DOT st DOT net DOT au (Gary)
Date: Tue, 30 Dec 1997 10:09:08 +3
MIME-Version: 1.0
Subject: Re: Puzzled:Allegro Code
CC: djgpp AT delorie DOT com
In-reply-to: <438_9712301100@softtech.st.net.au>

Gary wrote:

> Hello all,I am a learner of C and are somewhat puzzled by some code I've come
> across in Allegro,namely in allegro.h where it states as follows
> #define END_OF_FUNCTION(x)   x##_end(){}
> I have searched through all the allegro and system includes and have not found
> any reference to the expression  x##_end(){} 
 
AFAIK, ## symbol in a string is a way to concatenate strings in a macro 
definition and it's related to C language. In this case, for example if 
you write in your code 

  END_OF_FUNCTION(foo)

It will be replaced by the compiler with:

  foo_end(){}  

I don't know if the above answer your question but I hope this help.

=====================================================================
Alex Lozano - (Electronic Engineer)  E-mail: alex AT inti DOT gov DOT ar
INTI - CITEI                                 alexlozano AT geocities DOT com
CC 157 - (1650) - San Martín             
Buenos Aires - ARGENTINA
Home Page: http://www.geocities.com/SiliconValley/Vista/6521
=====================================================================

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019