Vely logo install | documentation | examples | articles | changelog
16.6.0 released on Mar 08, 2023 | articles updated on Mar 20, 2023

unused-var


Purpose: Prevent compiler error if variable is not used.

unused-var <variable name>
unused-var prevents C compiler from erroring out if <variable name> is unused. Generally, you don't want to have unused variables - they typically indicate errors or clutter. However, in some cases you might need such variables as a reminder for a future stage of a project, or for some other reason it is unavoidable. In any case, you can use unused-var to shield such instances from causing errors.

Examples

In the following, variable "bw" is created and the number of bytes written is stored in it. Such variable is not used at the moment, however if you would use it in the future and want to keep it, use unused-var to prevent compiler errors:
pf-out bytes-written define bw "Hi %s\n", "world"
unused-var bw

See also

Language ( dot   inline_code   statement_APIs   syntax_highlighting   unused-var  )  SEE ALL (documentation)


Copyright (c) 2017-2023 DaSoftver LLC. Vely is a trademark of Dasoftver LLC. The software and information herein are provided "AS IS" and without any warranties or guarantees of any kind. Vely elephant logo (c) 2022 DaSoftver LLC. This web page is licensed under CC-BY-SA-4.0. Contact email vely@vely.dev.