spielwiese
Last change
on this file since 951db29 was
894057,
checked in by Oleksandr Motsak <motsak@…>, 13 years ago
|
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
|
-
Property mode set to
100644
|
File size:
478 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | // string_expression[start, length] : a substring |
---|
3 | // (possibly filled up with blanks) |
---|
4 | // the substring of s starting at position 2 |
---|
5 | // with a length of 4 |
---|
6 | string s="123456"; |
---|
7 | s[2,4]; |
---|
8 | "abcd"[2,2]; |
---|
9 | // string_expression[position] : a character from a string |
---|
10 | s[3]; |
---|
11 | // string_expression[position..position] : |
---|
12 | // a substring starting at the first position up to the second |
---|
13 | // given position |
---|
14 | s[2..4]; |
---|
15 | // a function returning a string |
---|
16 | typeof(s); |
---|
17 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.