2014-09-27 08:15:32 +00:00
|
|
|
const string a = "hello world"; // 11
|
|
|
|
float b[] = { 1, 2, 3 }; // 3
|
|
|
|
float c[5] = { 5, 4, 3, 2, 1 }; // 5
|
|
|
|
const float d[] = { 1 }; // 1
|
|
|
|
|
|
|
|
void main() {
|
2014-10-18 11:47:23 +00:00
|
|
|
print(ftos(_length a), "\n"); // 11
|
|
|
|
print(ftos(_length b), "\n"); // 3
|
|
|
|
print(ftos(_length c), "\n"); // 5
|
|
|
|
print(ftos(_length d), "\n"); // 1
|
2014-09-27 08:15:32 +00:00
|
|
|
|
2014-10-18 11:47:23 +00:00
|
|
|
static float al = _length(a);
|
|
|
|
static float bl = _length(b);
|
|
|
|
static float cl = _length(c);
|
|
|
|
static float dl = _length(d);
|
2014-09-27 08:15:32 +00:00
|
|
|
|
|
|
|
print(ftos(al), "\n"); // 11
|
|
|
|
print(ftos(bl), "\n"); // 3
|
|
|
|
print(ftos(cl), "\n"); // 5
|
|
|
|
print(ftos(dl), "\n"); // 1
|
|
|
|
|
2014-10-18 11:47:23 +00:00
|
|
|
print(ftos(_length "hello world"), "\n"); // 11
|
2014-09-27 08:15:32 +00:00
|
|
|
}
|