Finding the length of a scalar variable with the length function 

Finding the length of a scalar variable with the length function
  • Finding the length of a scalar variable is incredibly easy using the length function. The syntax of length is as follows: 
  • length ([$variable_name]); 
  • Thus, if the scalar variable $name equals "Selena", then the scalar variable $length_of_name will be assigned the value of six in the following line: 
  • $length_of_name = length ($name); 
Cropping scalar variables with the chop function
Table of Contents
Manipulating substrings with the substr function


Graphics & Media Lab. >> Библиотека | Курсы | Графикон

Hosted by Graphics & Media Lab
http://graphics.cs.msu.su
lab_logo
mailto: Laboratory