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.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top