Alternative to "Case" for C Programming

  • Thread starter Thread starter mikestampone
  • Start date Start date
AI Thread Summary
The discussion revolves around finding a suitable term to describe "a set of conditions" in programming. The user initially considered using "case," but noted it is a reserved word in C. They explored alternatives like "state" but found it unsuitable since it was already assigned to another data type. The term "instance" was also deemed inappropriate, as it typically refers to a single object rather than a set of conditions. Ultimately, the user decided to replace their existing "state" data type with "instruction," allowing them to use "state" to represent a set of conditions effectively. The conversation highlights the importance of naming conventions in programming to avoid conflicts and enhance clarity.
mikestampone
Messages
14
Reaction score
0
I am looking for a word that means "a set of conditions". I was going to use "case", but that is a reserved word in C. Any thoughts?
 
Technology news on Phys.org
"State", as in the "state" of a system or object?
 
Thank you, but I am using "state" for another data type already. What do you think about "instance"?
 
Instance usually refers to a single object or moment in time, a reference to a state of existence, not a reference to the condition of that state.

You could always prefix "state" with a object qualifier, such as object_xyz_state, ...
 
Ok, so I won't use instance. I think I will replace my previously name "state" data type with instruction. Because currently the instructions are nested in the "state" type, but the state can be nested within the "instruction" type. So state will be replaced by "instruction", and I can use "state" for a set of conditions. Yes, that is what I will do. Thanks for helping me with this rcgldr.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top