What is the proper syntax for incrementing or decrementing NOT by 1, but rather with another number in a For Loop? I am trying to count by threes and "for(i=0;i<=30;i+3;) doesn't work. Why? The books and tutorials are great at telling you how to increment by 1 but rarely cover anything else.
User 11814397
Posts
-
Incrementing/Decrementing not by 1 -
If ... Else If ... Else statementsI am sorry for the very basic question, but I don't have a reference book. Can you have more than one "Else if " statement in case you needed to make more than 2 comparisons to the same item?
-
functionsI just learned this myself. When you define your function Greet(), you need to define it with something inside the parenthesis so the function expects to get data to then be used in the function. So you would define Greet() instead as Greet(var). In this case var is any variable name you choose. Greet can then use var in the function for whatever purposes it needs. When you call Greet, you would put a string or other variable name inside the parenthesis: Greet("Sue") or Greet(namex). The function will then treat that as var. :cool:Hope that was clear enough to help!