Non-interactive mode lets you pass all required values directly on the command line and receive an immediate result. This is useful in shell scripts or when you want to avoid interactive prompts. c-calc readsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Project516/c-calc/llms.txt
Use this file to discover all available pages before exploring further.
argc at startup: if exactly four values are present (the program name plus three arguments), it calculates and exits without prompting.
Usage syntax
Examples
Addition:Shell quoting for the * operator
Most shells expand a bare * as a glob pattern before passing it to the program, which means ./c-calc 4 * 5 may match filenames in the current directory instead of performing multiplication.
Always quote the multiplication operator when using it on the command line:Single quotes, double quotes, or a backslash escape (
\*) all work. This is a shell requirement, not a limitation of c-calc.How argument detection works
c-calc uses the standard Cmain signature:
argc equals the number of tokens on the command line including the program name. With three arguments, argc is 4. The check if (argc == 4) triggers the non-interactive path. Any other argument count — including zero extra arguments or more than three — falls through to interactive mode.