POV-Ray : Newsgroups : povray.general : macro naming convention : Re: macro naming convention Server Time
20 May 2024 12:46:05 EDT (-0400)
  Re: macro naming convention  
From: ingo
Date: 12 Jul 2023 06:10:00
Message: <web.64ae7b15c7533f8717bac71e8ffb8ce3@news.povray.org>
"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


Post a reply to this message

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