Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 313

Segmenting code into functions allows a programmer to create modular pieces of code that perform a defined task and then return to the area of code from which the function was "called". The typical case for creating a function is when one needs to perform the same action multiple times in a program.

0 votes

How to reset a variable just before entering a function?

It isn't clear what behavior you expect from v, especially since you have two of them - the global v at the head of your program, and the parameter v of the function waterNowrun(int v). My understandi …
JRobert's user avatar
  • 15.3k
1 vote

Why is function mentioned in global declaration?

A multi-pass compiler could look over the code and collect function definitions in one pass, then in a later pass, compile the code that calls those functions, or detect errors in those calls, if there …
JRobert's user avatar
  • 15.3k
1 vote

How to return Char Array Value in Arduino IDE Function?

Another (less elegant) way to do it is to make data a global object, which again, gives it a lifetime greater that that of the function, but globals are subject to accidental over-writes and abuse by other functions
JRobert's user avatar
  • 15.3k