Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 394
    • Issues 394
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 20
    • Merge requests 20
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Wiki
  • Tutorials
  • Coding Style

Coding Style · Changes

Page history
Add naming rules to code style authored Apr 09, 2025 by Quinten Cabo's avatar Quinten Cabo
Show whitespace changes
Inline Side-by-side
tutorials/Coding-Style.md
View page @ 2e3c7ad1
# Naming
All exported functions are prefixed by the module the live in (here: STR).
Function names are do not use "_" but capitalize new words.
# Make non exported functions static
Functions that are not in the `.h` file should be declared static.
# Blocks with 1 statement # Blocks with 1 statement
- The body of an if condition should at preferably have brackets. If the body has just one statement you may leave out the `{}` but in that case put the statement indented on another line. Also only do this if you think it unlikely that you will add more statements to the body later. - The body of an if condition should at preferably have brackets. If the body has just one statement you may leave out the `{}` but in that case put the statement indented on another line. Also only do this if you think it unlikely that you will add more statements to the body later.
......
Clone repository
  • concepts
    • Deprecated Modules
    • Globals
    • Named Tuples
    • Overloading
    • Preprocessor
    • Primitive functions
    • Runetime Representations
    • input stdin
    • phm xt
    • ref counting methods
    • type famlies
    • type patterns
  • error messages
    • Anthropomorphic error essages
    • Colored error messages
    • Empty file error
View All Pages