Ask Your Question
0

Is it acceptable to define variables outside of a function that are not recognized?

asked 2023-06-10 02:13:28 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-06-10 02:23:01 +0000

qstack gravatar image

No, it is not acceptable. Variables defined outside of a function are considered global variables and should be recognized throughout the program unless explicitly hidden or overwritten by a local variable with the same name within a function. If the variables are not recognized outside of the function, it could indicate a problem with the program's scope or variable naming.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-10 02:13:28 +0000

Seen: 21 times

Last updated: Jun 10 '23