source: git/Tst/Manual/string_expressions.tst @ 951db29

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 
1LIB "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
6string s="123456";
7s[2,4];
8"abcd"[2,2];
9// string_expression[position] : a character from a string
10s[3];
11// string_expression[position..position] :
12// a substring starting at the first position up to the second
13// given position
14s[2..4];
15// a function returning a string
16typeof(s);
17tst_status(1);$
Note: See TracBrowser for help on using the repository browser.