Files
harbour-core/harbour/tests/working/strsub.prg
1999-08-09 05:57:34 +00:00

43 lines
668 B
Plaintext

/*
* $Id$
*/
// Testing strings concat
// Expected result:
//
// [STRINGSCONCAT ]
// [STRINGSCONCAT ]
// [STRINGSCONCAT ]
// >AB<
// >AB <
// >AB <
// >A B <
// >B <
function main()
LOCAL a := "STRINGS "
LOCAL b := "CONCAT"
LOCAL c
LOCAL i
for i := 1 to 3
a += " "
c := a
c -= b
QOut( "[" + c + "]" )
next
QOut( ">" + "A" - "B" + "<" ) // "AB"
QOut( ">" + "A " - "B" + "<" ) // "AB "
QOut( ">" + "A " - "B " + "<" ) // "AB "
QOut( ">" + "A " - " B" + "<" ) // "A B "
QOut( ">" + " " - "B " + "<" ) // "B "
QOut()
__Accept( "Press <Enter> to raise an error!" )
QOut( a - i )
return nil