Search Tutorials
A Working Example Let's again consider the function "Length". Here is it's correct syntax (syntax is geekspeak for programming grammar) Length (string) The function name is "Length". When the computer reads this it know that there will be one piece of information (the argument) in the brackets. The argument can be one of two things, a string or a variable containing a string. As we learnt previously a string is surrounded by quote marks and a variable name isn't. So let's now look at the function "Length" in action using both types of argument: Set Variable: "stringlength" = Length ("myvariable")
The result is the number 10 Set Variable: "othervariable" = "Hello" Set Variable: "stringlength" = Length (othervariable) The result for the second example is the number 5. So you can see how the function works. It identifies the role it must play in this case, find the length. Then it takes the information that you have given it (the string), counts the number of characters in the string, and outputs a numeric result into the variable "stringlength".
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|