POV-Ray : Newsgroups : povray.general : macro naming convention : Re: macro naming convention Server Time
20 May 2024 12:23:31 EDT (-0400)
  Re: macro naming convention  
From: And
Date: 13 Jul 2023 00:05:00
Message: <web.64af777ac7533f87ee1d8e88aa81652d@news.povray.org>
"ingo" <nomail@nomail> wrote:
> "And" <49341109@ntnu.edu.tw> wrote:
> > should macro name start with uppercase?
>
> Yes, I think so, to avoid collisions with the SDL
>
> For macro's inside an include file I tend to prepend the name with a few
> 'meaningfull' capitals.
>
> Macro's inside a Singly Linked List include look like
> SLLInit()
> SLLPush()
> SLLAdd()
> SLLPop()
> SLLPeek()
> ....
>
> For macro's and variables that are private to an include file I tend to prepend
> them with an underscore.
>
> ingo


Is it a good idea offer only one (public using) macro in an include file?

I just see someone use two underscore __ to connect words, then use another one
underscore _ , I would like to know the occasion.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.