From a5c36c03decdcbfb4fb33c42286f5b1ff3b20bbe Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 22 Oct 2012 21:50:36 +0000 Subject: [PATCH] 2012-10-22 23:47 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbct/tests/*.prg ! various cleanups and fixes after running them each using hbrun --- harbour/ChangeLog | 5 +++ harbour/contrib/hbct/tests/afteratn.prg | 18 ++++---- harbour/contrib/hbct/tests/asciisum.prg | 6 +-- harbour/contrib/hbct/tests/ascpos.prg | 6 +-- harbour/contrib/hbct/tests/atadjust.prg | 27 ++++++------ harbour/contrib/hbct/tests/atnum.prg | 18 ++++---- harbour/contrib/hbct/tests/attoken.prg | 16 +++---- harbour/contrib/hbct/tests/beforatn.prg | 18 ++++---- harbour/contrib/hbct/tests/charlist.prg | 2 +- harbour/contrib/hbct/tests/charnlst.prg | 4 +- harbour/contrib/hbct/tests/charnot.prg | 4 +- harbour/contrib/hbct/tests/charrepl.prg | 8 ++-- harbour/contrib/hbct/tests/charrll.prg | 6 +-- harbour/contrib/hbct/tests/charrlr.prg | 6 +-- harbour/contrib/hbct/tests/charshl.prg | 6 +-- harbour/contrib/hbct/tests/charshr.prg | 6 +-- harbour/contrib/hbct/tests/charslst.prg | 2 +- harbour/contrib/hbct/tests/csetarge.prg | 32 +++++++------- harbour/contrib/hbct/tests/expomant.prg | 2 +- harbour/contrib/hbct/tests/finan.prg | 16 +++---- harbour/contrib/hbct/tests/math.prg | 26 +++++------ harbour/contrib/hbct/tests/num1.prg | 8 +--- harbour/contrib/hbct/tests/rangerem.prg | 6 +-- harbour/contrib/hbct/tests/rangerep.prg | 6 +-- harbour/contrib/hbct/tests/token.prg | 18 ++++---- harbour/contrib/hbct/tests/token2.prg | 42 +++++++++--------- harbour/contrib/hbct/tests/tokensep.prg | 12 ++--- harbour/contrib/hbct/tests/trig.prg | 58 ++++++++++++------------- 28 files changed, 193 insertions(+), 191 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c28e2a7905..8cf4bcddff 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,11 @@ The license applies to all entries newer than 2009-04-28. */ +2012-10-22 23:47 UTC+0200 Viktor Szakats (harbour syenar.net) + * contrib/hbct/tests/*.prg + ! various cleanups and fixes after running them each + using hbrun + 2012-10-22 16:22 UTC+0200 Viktor Szakats (harbour syenar.net) * contrib/hbct/dattime3.c * contrib/hbct/tests/dates4.prg diff --git a/harbour/contrib/hbct/tests/afteratn.prg b/harbour/contrib/hbct/tests/afteratn.prg index a57e11f7c6..fd6841c5d3 100644 --- a/harbour/contrib/hbct/tests/afteratn.prg +++ b/harbour/contrib/hbct/tests/afteratn.prg @@ -68,11 +68,11 @@ PROCEDURE Main() // Some simple tests ? " Simple tests:" ? [ afteratnum("..",cStr) should be "test!",] - ? [ and is "] + afteratnum( "..", cStr ) + ["] + ? [ and is "] + afteratnum( "..", cStr ) + ["] ? [ afteratnum("..",cStr,2) should be ".is...a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2 ) + ["] ? [ afteratnum("..",cStr,2,2) should be ".a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] ? // Tests with CSetAtMuPa(.T.) @@ -80,11 +80,11 @@ PROCEDURE Main() ? " Setting csetatmupa() to .T." csetatmupa( .T. ) ? [ afteratnum("..",cStr) should be "test!",] - ? [ and is "] + afteratnum( "..", cStr ) + ["] + ? [ and is "] + afteratnum( "..", cStr ) + ["] ? [ afteratnum("..",cStr,2) should be "This...is...a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2 ) + ["] ? [ afteratnum("..",cStr,2,2) should be "is...a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] ? " Setting csetatmupa() to .F." csetatmupa( .F. ) ? @@ -94,11 +94,11 @@ PROCEDURE Main() ? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")] setatlike( CT_SETATLIKE_WILDCARD, "." ) ? [ afteratnum("..",cStr) should be "",] - ? [ and is "] + afteratnum( "..", cStr ) + ["] + ? [ and is "] + afteratnum( "..", cStr ) + ["] ? [ afteratnum("..",cStr,2,2) should be "s...is...a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2, 2 ) + ["] ? [ afteratnum("..",cStr,2,10) should be ".a...test!",] - ? [ and is "] + afteratnum( "..", cStr, 2, 10 ) + ["] + ? [ and is "] + afteratnum( "..", cStr, 2, 10 ) + ["] ? ? "End test of AFTERATNUM()" diff --git a/harbour/contrib/hbct/tests/asciisum.prg b/harbour/contrib/hbct/tests/asciisum.prg index b80e8a168e..f1a94c94bc 100644 --- a/harbour/contrib/hbct/tests/asciisum.prg +++ b/harbour/contrib/hbct/tests/asciisum.prg @@ -61,9 +61,9 @@ PROCEDURE Main() ? "Begin test of ASCIISUM()" ? - ? [ asciisum(replicate("A", 10000)) == 650000 ? --> ] + Str( asciisum(Replicate("A",10000 ) ) ) - ? [ asciisum("0123456789") == 525 ? --> ] + Str( asciisum("0123456789" ) ) - ? [ asciisum(nil) == 0 ? --> ] + Str( asciisum(nil ) ) + ? [ asciisum(replicate("A", 10000)) == 650000 ? --> ] + Str( asciisum( Replicate( "A", 10000 ) ) ) + ? [ asciisum("0123456789") == 525 ? --> ] + Str( asciisum( "0123456789" ) ) + ? [ asciisum(NIL) == 0 ? --> ] + Str( asciisum( NIL ) ) ? ? "End test of ASCIISUM()" diff --git a/harbour/contrib/hbct/tests/ascpos.prg b/harbour/contrib/hbct/tests/ascpos.prg index 81129cb0fc..2fad3c86cb 100644 --- a/harbour/contrib/hbct/tests/ascpos.prg +++ b/harbour/contrib/hbct/tests/ascpos.prg @@ -61,9 +61,9 @@ PROCEDURE Main() ? "Begin test of ASCPOS()" ? - ? [ ascpos("0123456789") == 57 ? --> ] + Str( ascpos("0123456789" ) ) - ? [ ascpos("0123456789",1) == 48 ? --> ] + Str( ascpos("0123456789",1 ) ) - ? [ ascpos("0123456789",11) == 0 ? --> ] + Str( ascpos("0123456789",11 ) ) + ? [ ascpos("0123456789") == 57 ? --> ] + Str( ascpos( "0123456789" ) ) + ? [ ascpos("0123456789",1) == 48 ? --> ] + Str( ascpos( "0123456789", 1 ) ) + ? [ ascpos("0123456789",11) == 0 ? --> ] + Str( ascpos( "0123456789", 11 ) ) ? ? "End test of ASCPOS()" diff --git a/harbour/contrib/hbct/tests/atadjust.prg b/harbour/contrib/hbct/tests/atadjust.prg index ae75428979..836cdc50d0 100644 --- a/harbour/contrib/hbct/tests/atadjust.prg +++ b/harbour/contrib/hbct/tests/atadjust.prg @@ -56,7 +56,8 @@ PROCEDURE Main() - LOCAL aStr := { "Introduction: 1", ; + LOCAL aStr := { ; + "Introduction: 1", ; "Theory: 5", ; "Material and Methods: 13", ; "Results: 19", ; @@ -70,29 +71,29 @@ PROCEDURE Main() ? ? " Original strings:" - for ni := 1 TO Len( aStr ) - ? Space( 4 ) + aStr[ni] - next + FOR ni := 1 TO Len( aStr ) + ? Space( 4 ) + aStr[ ni ] + NEXT ? ? ' ATADJUST(":", aStr[ni], 21,,, ".") yields' - for ni := 1 TO Len( aStr ) - ? Space( 4 ) + atadjust( ":", aStr[ni], 21, 1,,"." ) - next + FOR ni := 1 TO Len( aStr ) + ? Space( 4 ) + atadjust( ":", aStr[ ni ], 21, 1,, "." ) + NEXT ? ? ' ATADJUST(":", aStr[ni], 10, 1,, ".") yields' - for ni := 1 TO Len( aStr ) - ? Space( 4 ) + atadjust( ":", aStr[ni], 10, 1,,"." ) - next + FOR ni := 1 TO Len( aStr ) + ? Space( 4 ) + atadjust( ":", aStr[ ni ], 10, 1,, "." ) + NEXT ? ? ' SETATLIKE(CT_SETATLIKE_WILDCARD, ":")' ? ' ATADJUST(":", aStr[ni], 10, 1,, ".") yields now' setatlike( CT_SETATLIKE_WILDCARD, ":" ) - for ni := 1 TO Len( aStr ) - ? Space( 4 ) + atadjust( ":", aStr[ni], 10, 1,,"." ) - next + FOR ni := 1 TO Len( aStr ) + ? Space( 4 ) + atadjust( ":", aStr[ ni ], 10, 1,, "." ) + NEXT ? ? "End test of ATADJUST()" diff --git a/harbour/contrib/hbct/tests/atnum.prg b/harbour/contrib/hbct/tests/atnum.prg index c8763a4e16..cae3a1b7b0 100644 --- a/harbour/contrib/hbct/tests/atnum.prg +++ b/harbour/contrib/hbct/tests/atnum.prg @@ -68,11 +68,11 @@ PROCEDURE Main() // Some simple tests ? " Simple tests:" ? [ atnum("..",cStr) should be 18,] - ? [ and is ], atnum( "..", cStr ) + ? [ and is ], atnum( "..", cStr ) ? [ atnum("..",cStr,2) should be 8,] - ? [ and is ], atnum( "..", cStr, 2 ) + ? [ and is ], atnum( "..", cStr, 2 ) ? [ atnum("..",cStr,2,2) should be 13,] - ? [ and is ], atnum( "..", cStr, 2, 2 ) + ? [ and is ], atnum( "..", cStr, 2, 2 ) ? // Tests with CSetAtMuPa(.T.) @@ -80,11 +80,11 @@ PROCEDURE Main() ? " Setting csetatmupa() to .T." csetatmupa( .T. ) ? [ atnum("..",cStr) should be 18,] - ? [ and is ], atnum( "..", cStr ) + ? [ and is ], atnum( "..", cStr ) ? [ atnum("..",cStr,2) should be 2,] - ? [ and is ], atnum( "..", cStr, 2 ) + ? [ and is ], atnum( "..", cStr, 2 ) ? [ atnum("..",cStr,2,2) should be 9,] - ? [ and is ], atnum( "..", cStr, 2, 2 ) + ? [ and is ], atnum( "..", cStr, 2, 2 ) ? " Setting csetatmupa() to .F." csetatmupa( .F. ) ? @@ -94,11 +94,11 @@ PROCEDURE Main() ? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")] setatlike( CT_SETATLIKE_WILDCARD, "." ) ? [ atnum("..",cStr) should be 23,] - ? [ and is ], atnum( "..", cStr ) + ? [ and is ], atnum( "..", cStr ) ? [ atnum("..",cStr,2,2) should be 5,] - ? [ and is ], atnum( "..", cStr, 2, 2 ) + ? [ and is ], atnum( "..", cStr, 2, 2 ) ? [ atnum("..",cStr,2,10) should be 13,] - ? [ and is ], atnum( "..", cStr, 2, 10 ) + ? [ and is ], atnum( "..", cStr, 2, 10 ) ? ? "End test of ATNUM()" diff --git a/harbour/contrib/hbct/tests/attoken.prg b/harbour/contrib/hbct/tests/attoken.prg index c98f4a3b77..74107cb33f 100644 --- a/harbour/contrib/hbct/tests/attoken.prg +++ b/harbour/contrib/hbct/tests/attoken.prg @@ -66,20 +66,20 @@ PROCEDURE Main() // Some simple tests ? " Simple tests:" - ? [ attoken("Hello, World!") == 8 ? ---------> ] + Str( attoken("Hello, World!" ) ) - ? [ attoken("Hello, World!",,2) == 8 ? ------> ] + Str( attoken("Hello, World!",,2 ) ) - ? [ attoken("Hello, World!",,2,1) == 7 ? ----> ] + Str( attoken("Hello, World!",,2,1 ) ) - ? [ attoken("Hello, World!"," ",2,1) == 8 ? -> ] + Str( attoken("Hello, World!"," ",2,1 ) ) + ? [ attoken("Hello, World!") == 8 ? ---------> ] + Str( attoken( "Hello, World!" ) ) + ? [ attoken("Hello, World!",,2) == 8 ? ------> ] + Str( attoken( "Hello, World!",, 2 ) ) + ? [ attoken("Hello, World!",,2,1) == 7 ? ----> ] + Str( attoken( "Hello, World!",, 2, 1 ) ) + ? [ attoken("Hello, World!"," ",2,1) == 8 ? -> ] + Str( attoken( "Hello, World!", " ", 2, 1 ) ) ? ? [ Tokenizing a string with skip width == 1 and ".!" as tokenizer list:] ? " Value of cStr is:" + Chr( 34 ) + cStr + Chr( 34 ) ? - for ni := 1 TO numtoken( cStr, ".!", 1 ) + FOR ni := 1 TO numtoken( cStr, ".!", 1 ) ? [ Token #] + AllTrim( Str( ni ) ) + [("] + token( cStr, ".!", ni, 1 ) + [")] - ? " starts at pos " + Str( npos := attoken(cStr, ".!", ni, 1 ),3 ) + ; - " and is " + iif( SubStr( cStr, npos, 1 ) $ ".!", "", "not " ) + "an empty token." ) - next ni + ? " starts at pos " + Str( npos := attoken( cStr, ".!", ni, 1 ), 3 ) + ; + " and is " + iif( SubStr( cStr, npos, 1 ) $ ".!", "", "not " ) + "an empty token." + NEXT ? ? "End test of ATTOKEN()" diff --git a/harbour/contrib/hbct/tests/beforatn.prg b/harbour/contrib/hbct/tests/beforatn.prg index 02c226d49e..ba2ca64cf9 100644 --- a/harbour/contrib/hbct/tests/beforatn.prg +++ b/harbour/contrib/hbct/tests/beforatn.prg @@ -68,11 +68,11 @@ PROCEDURE Main() // Some simple tests ? " Simple tests:" ? [ beforatnum("..",cStr) should be "...This...is...a.",] - ? [ and is "] + beforatnum( "..", cStr ) + ["] + ? [ and is "] + beforatnum( "..", cStr ) + ["] ? [ beforatnum("..",cStr,2) should be "...This",] - ? [ and is "] + beforatnum( "..", cStr, 2 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2 ) + ["] ? [ beforatnum("..",cStr,2,2) should be "...This...is",] - ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] ? // Tests with CSetAtMuPa(.T.) @@ -80,11 +80,11 @@ PROCEDURE Main() ? " Setting csetatmupa() to .T." csetatmupa( .T. ) ? [ beforatnum("..",cStr) should be "...This...is...a.",] - ? [ and is "] + beforatnum( "..", cStr ) + ["] + ? [ and is "] + beforatnum( "..", cStr ) + ["] ? [ beforatnum("..",cStr,2) should be ".",] - ? [ and is "] + beforatnum( "..", cStr, 2 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2 ) + ["] ? [ beforatnum("..",cStr,2,2) should be "...This.",] - ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] ? " Setting csetatmupa() to .F." csetatmupa( .F. ) ? @@ -94,11 +94,11 @@ PROCEDURE Main() ? [ Setting setatlike(CT_SETATLIKE_WILDCARD, ".")] setatlike( CT_SETATLIKE_WILDCARD, "." ) ? [ beforatnum("..",cStr) should be "...This...is...a...tes",] - ? [ and is "] + beforatnum( "..", cStr ) + ["] + ? [ and is "] + beforatnum( "..", cStr ) + ["] ? [ beforatnum("..",cStr,2,2) should be "...T",] - ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2, 2 ) + ["] ? [ beforatnum("..",cStr,2,10) should be "...This...is",] - ? [ and is "] + beforatnum( "..", cStr, 2, 10 ) + ["] + ? [ and is "] + beforatnum( "..", cStr, 2, 10 ) + ["] ? ? "End test of BEFORATNUM()" diff --git a/harbour/contrib/hbct/tests/charlist.prg b/harbour/contrib/hbct/tests/charlist.prg index a59bdef188..2445f83d14 100644 --- a/harbour/contrib/hbct/tests/charlist.prg +++ b/harbour/contrib/hbct/tests/charlist.prg @@ -64,7 +64,7 @@ PROCEDURE Main() // simple tests ? "Simple tests:" ? [ charlist("Hello World !") == "Helo Wrd!" ? -> "] + charlist( "Hello World !" ) + ["] - ? [ charlist(nil) == "" ? -> "] + charlist( nil ) + ["] + ? [ charlist(NIL) == "" ? -> "] + charlist( NIL ) + ["] ? "End test of CHARLIST()" ? diff --git a/harbour/contrib/hbct/tests/charnlst.prg b/harbour/contrib/hbct/tests/charnlst.prg index 7786fa16dc..2635904470 100644 --- a/harbour/contrib/hbct/tests/charnlst.prg +++ b/harbour/contrib/hbct/tests/charnlst.prg @@ -64,8 +64,8 @@ PROCEDURE Main() // simple tests ? "Simple tests:" - ? [ charnolist(charnolist("Hello World !")) == " !HWdelor" ? -> "] + charnolist( charnolist("Hello World !" ) ) + ["] - ? [ charnolist(charnolist(nil)) == ""? -> "] + charnolist( charnolist(nil ) ) + ["] + ? [ charnolist(charnolist("Hello World !")) == " !HWdelor" ? -> "] + charnolist( charnolist( "Hello World !" ) ) + ["] + ? [ charnolist(charnolist(NIL)) == "" ? -> "] + charnolist( charnolist( NIL ) ) + ["] ? "End test of CHARNOLIST()" ? diff --git a/harbour/contrib/hbct/tests/charnot.prg b/harbour/contrib/hbct/tests/charnot.prg index ce30326bf0..4db0be00b4 100644 --- a/harbour/contrib/hbct/tests/charnot.prg +++ b/harbour/contrib/hbct/tests/charnot.prg @@ -71,12 +71,12 @@ PROCEDURE Main() ? [ ] cStr := charnot( Chr( 85 ) + Chr( 128 ) + Chr( 170 ) + Chr( 1 ) ) - for ni := 1 TO Len( cStr ) + FOR ni := 1 TO Len( cStr ) ?? "chr(" + AllTrim( Str( Asc( SubStr( cStr, ni, 1 ) ) ) ) + ")" IF ni < Len( cStr ) ?? "+" ENDIF - next ni + NEXT ? ? [ charnot(charnot("This is a test!")) == "This is a test!" ?] diff --git a/harbour/contrib/hbct/tests/charrepl.prg b/harbour/contrib/hbct/tests/charrepl.prg index 090b6fc56c..89e5e7498e 100644 --- a/harbour/contrib/hbct/tests/charrepl.prg +++ b/harbour/contrib/hbct/tests/charrepl.prg @@ -63,11 +63,11 @@ PROCEDURE Main() // simple tests ? "Simple tests:" - ? [ charrepl("1234", "1x2y3z", "abcd") == "axbycz" ? --> "] + charrepl( "1234", "1x2y3z", "abcd" ) + ["] + ? [ charrepl("1234", "1x2y3z", "abcd") == "axbycz" ? --> "] + charrepl( "1234", "1x2y3z", "abcd" ) + ["] ? [ charrepl("abcdefghij", "jhfdb", "1234567890") == "08642" ? --> "] + charrepl( "abcdefghij", "jhfdb", "1234567890" ) + ["] - ? [ charrepl("abcdefghij", "jhfdb", "12345") == "55542" ? --> "] + charrepl( "abcdefghij", "jhfdb", "12345" ) + ["] - ? [ charrepl("1234", "1234", "234A") == "AAAA" ? --> "] + charrepl( "1234", "1234", "234A" ) + ["] - ? [ charrepl("1234", "1234", "234A", .T.) == "234A" ? --> "] + charrepl( "1234", "1234", "234A", .T. ) + ["] + ? [ charrepl("abcdefghij", "jhfdb", "12345") == "55542" ? --> "] + charrepl( "abcdefghij", "jhfdb", "12345" ) + ["] + ? [ charrepl("1234", "1234", "234A") == "AAAA" ? --> "] + charrepl( "1234", "1234", "234A" ) + ["] + ? [ charrepl("1234", "1234", "234A", .T.) == "234A" ? --> "] + charrepl( "1234", "1234", "234A", .T. ) + ["] ? ? "End test of CHARREPL()" diff --git a/harbour/contrib/hbct/tests/charrll.prg b/harbour/contrib/hbct/tests/charrll.prg index d713669e50..90ba4e2e71 100644 --- a/harbour/contrib/hbct/tests/charrll.prg +++ b/harbour/contrib/hbct/tests/charrll.prg @@ -70,13 +70,13 @@ PROCEDURE Main() ? [ chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4) ? -->] ? [ ] - cStr := charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) - for ni := 1 TO Len( cStr ) + cStr := charrll( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) + FOR ni := 1 TO Len( cStr ) ?? "chr(" + AllTrim( Str( Asc( SubStr( cStr, ni, 1 ) ) ) ) + ")" IF ni < Len( cStr ) ?? "+" ENDIF - next ni + NEXT ? ? "End test of CHARRLL()" diff --git a/harbour/contrib/hbct/tests/charrlr.prg b/harbour/contrib/hbct/tests/charrlr.prg index 1f06e9bb5f..fc76f80f0d 100644 --- a/harbour/contrib/hbct/tests/charrlr.prg +++ b/harbour/contrib/hbct/tests/charrlr.prg @@ -70,13 +70,13 @@ PROCEDURE Main() ? [ chr(32)+chr(64)+chr(128)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) ? -->] ? [ ] - cStr := charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) - for ni := 1 TO Len( cStr ) + cStr := charrlr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) + FOR ni := 1 TO Len( cStr ) ?? "chr(" + AllTrim( Str( Asc( SubStr( cStr, ni, 1 ) ) ) ) + ")" IF ni < Len( cStr ) ?? "+" ENDIF - next ni + NEXT ? ? "End test of CHARRLR()" diff --git a/harbour/contrib/hbct/tests/charshl.prg b/harbour/contrib/hbct/tests/charshl.prg index 8ef445f5a3..b68bdc935e 100644 --- a/harbour/contrib/hbct/tests/charshl.prg +++ b/harbour/contrib/hbct/tests/charshl.prg @@ -70,13 +70,13 @@ PROCEDURE Main() ? [ chr(8)+chr(16)+chr(32)+chr(64)+chr(128)+chr(0)+chr(0)+chr(0) ? -->] ? [ ] - cStr := charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) - for ni := 1 TO Len( cStr ) + cStr := charshl( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) + FOR ni := 1 TO Len( cStr ) ?? "chr(" + AllTrim( Str( Asc( SubStr( cStr, ni, 1 ) ) ) ) + ")" IF ni < Len( cStr ) ?? "+" ENDIF - next ni + NEXT ? ? "End test of CHARSHL()" diff --git a/harbour/contrib/hbct/tests/charshr.prg b/harbour/contrib/hbct/tests/charshr.prg index 3b6a1a2fc8..362e8c6b93 100644 --- a/harbour/contrib/hbct/tests/charshr.prg +++ b/harbour/contrib/hbct/tests/charshr.prg @@ -70,13 +70,13 @@ PROCEDURE Main() ? [ chr(0)+chr(0)+chr(0)+chr(1)+chr(2)+chr(4)+chr(8)+chr(16) ? -->] ? [ ] - cStr := charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) - for ni := 1 TO Len( cStr ) + cStr := charshr( Chr( 1 ) + Chr( 2 ) + Chr( 4 ) + Chr( 8 ) + Chr( 16 ) + Chr( 32 ) + Chr( 64 ) + Chr( 128 ), 3 ) + FOR ni := 1 TO Len( cStr ) ?? "chr(" + AllTrim( Str( Asc( SubStr( cStr, ni, 1 ) ) ) ) + ")" IF ni < Len( cStr ) ?? "+" ENDIF - next ni + NEXT ? ? "End test of CHARSHR()" diff --git a/harbour/contrib/hbct/tests/charslst.prg b/harbour/contrib/hbct/tests/charslst.prg index d220b119c6..f7e5256c29 100644 --- a/harbour/contrib/hbct/tests/charslst.prg +++ b/harbour/contrib/hbct/tests/charslst.prg @@ -64,7 +64,7 @@ PROCEDURE Main() // simple tests ? "Simple tests:" ? [ charslist("Hello World !") == " !HWdelor" ? -> "] + charslist( "Hello World !" ) + ["] - ? [ charslist(nil) == "" ? -> "] + charslist( nil ) + ["] + ? [ charslist(NIL) == "" ? -> "] + charslist( NIL ) + ["] ? "End test of CHARSLIST()" ? diff --git a/harbour/contrib/hbct/tests/csetarge.prg b/harbour/contrib/hbct/tests/csetarge.prg index a5db72e489..9784ee3dc5 100644 --- a/harbour/contrib/hbct/tests/csetarge.prg +++ b/harbour/contrib/hbct/tests/csetarge.prg @@ -61,6 +61,8 @@ PROCEDURE main ctinit() + CLS + ? "Begin test of CSETARGERR()" ? @@ -201,7 +203,7 @@ FUNCTION myerrhandler( oerr ) LOCAL ni, nDigit - MEMVAR INPUT + LOCAL cInput ? " Error handler called:" ? " err:severity.....:", oerr:severity @@ -224,12 +226,10 @@ FUNCTION myerrhandler( oerr ) IF oerr:canSubstitute - PRIVATE Input := "" - ? " Error handler can substitute return value, so please" - ACCEPT " type in return value : " TO Input + ACCEPT " type in return value : " TO cInput - IF Empty( Input ) + IF Empty( cInput ) ? " You have chosen the default return value. Ok, this should " ? " be now problem, since the last digit of err:subCode indicates" ? " the type of the return value:" @@ -242,49 +242,49 @@ FUNCTION myerrhandler( oerr ) DO CASE CASE nDigit == 0 ?? "NIL." - Input := NIL + cInput := NIL CASE nDigit == 1 ?? "String." - Input := "" + cInput := "" CASE nDigit == 2 ?? "Integer." - Input := 0 + cInput := 0 CASE nDigit == 3 ?? "Float." - Input := 0.0 + cInput := 0.0 CASE nDigit == 4 ?? "Boolean." - Input := .F. + cInput := .F. CASE nDigit == 5 ?? "Date." - Input := CToD( "" ) + cInput := CToD( "" ) CASE nDigit == 6 ?? "Block." - Input := {|| NIL } + cInput := {|| NIL } CASE nDigit == 7 ?? "Array." - Input := {} + cInput := {} CASE nDigit == 8 ?? "Object." - Input := GetNew() + cInput := GetNew() CASE nDigit == 9 ?? " "] + ; - rangerem( "0", "9", "year2002.dbf" ) + ["] ) + rangerem( "0", "9", "year2002.dbf" ) + ["] ? [ rangerem("9","0","year2002.dbf") == "22" ? --> "] + ; - rangerem( "9", "0", "year2002.dbf" ) + ["] ) + rangerem( "9", "0", "year2002.dbf" ) + ["] ? [ rangerem("0","9","yearcurr.dbf") == "yearcurr.dbf" ? --> "] + ; - rangerem( "0", "9", "yearcurr.dbf" ) + ["] ) + rangerem( "0", "9", "yearcurr.dbf" ) + ["] ? ? "End test of RANGEREM()" diff --git a/harbour/contrib/hbct/tests/rangerep.prg b/harbour/contrib/hbct/tests/rangerep.prg index 7618b1c206..d47c92b946 100644 --- a/harbour/contrib/hbct/tests/rangerep.prg +++ b/harbour/contrib/hbct/tests/rangerep.prg @@ -62,11 +62,11 @@ PROCEDURE Main() ? ? [ rangerepl("0","9","year2002.dbf","?") == "year????.dbf" ? --> "] + ; - rangerepl( "0", "9", "year2002.dbf", "?" ) + ["] ) + rangerepl( "0", "9", "year2002.dbf", "?" ) + ["] ? [ rangerepl("9","0","year2002.dbf","?") == "????2??2????" ? --> "] + ; - rangerepl( "9", "0", "year2002.dbf", "?" ) + ["] ) + rangerepl( "9", "0", "year2002.dbf", "?" ) + ["] ? [ rangerepl("0","9","yearcurr.dbf","?") == "yearcurr.dbf" ? --> "] + ; - rangerepl( "0", "9", "yearcurr.dbf", "?" ) + ["] ) + rangerepl( "0", "9", "yearcurr.dbf", "?" ) + ["] ? ? "End test of RANGEREPL()" diff --git a/harbour/contrib/hbct/tests/token.prg b/harbour/contrib/hbct/tests/token.prg index ac13a6be89..0b8e1f6590 100644 --- a/harbour/contrib/hbct/tests/token.prg +++ b/harbour/contrib/hbct/tests/token.prg @@ -69,27 +69,27 @@ PROCEDURE Main() // Some simple tests ? " Simple tests:" ? [ token("Hello, World!") == "World" ? -----------> "] + token( "Hello, World!" ) + ["] - ? [ token("Hello, World!",,2,1) == "" ? -----------> "] + token( "Hello, World!",,2,1 ) + ["] - ? [ token("Hello, World!",",",2,1) == " World!" ? -> "] + token( "Hello, World!",",",2,1 ) + ["] - ? [ token("Hello, World!"," ",2,1) == "World!" ? --> "] + token( "Hello, World!"," ",2,1 ) + ["] + ? [ token("Hello, World!",,2,1) == "" ? -----------> "] + token( "Hello, World!",, 2, 1 ) + ["] + ? [ token("Hello, World!",",",2,1) == " World!" ? -> "] + token( "Hello, World!", ",", 2, 1 ) + ["] + ? [ token("Hello, World!"," ",2,1) == "World!" ? --> "] + token( "Hello, World!", " ", 2, 1 ) + ["] ? ? [ Tokenizing the string "] + cStr + ["] ? [ with skip width == 1 and ".,!" as tokenizer list:] ? - for ni := 1 TO numtoken( cStr, ".,!", 1 ) + FOR ni := 1 TO numtoken( cStr, ".,!", 1 ) ? [ Token #] + AllTrim( Str( ni ) ) + [("] + token( cStr, ".,!", ni, 1, @cPre, @cPost ) + ; - [") @ pos ] + Str( npos := attoken( cStr, ".,!", ni, 1 ), 3 ) + [, tokenized by "] + cPre + [" and "] + cPost + [" is ] + iif( SubStr( cStr,npos,1 ) $ ".,!", "", "not " ) + "empty" ) - next ni + [") @ pos ] + Str( npos := attoken( cStr, ".,!", ni, 1 ), 3 ) + [, tokenized by "] + cPre + [" and "] + cPost + [" is ] + iif( SubStr( cStr, npos, 1 ) $ ".,!", "", "not " ) + "empty" + NEXT ? ? [ Tokenizing the string "] + cStr + ["] ? [ with skip width == 3 and ".,!" as tokenizer list:] ? - for ni := 1 TO numtoken( cStr, ".,!", 3 ) + FOR ni := 1 TO numtoken( cStr, ".,!", 3 ) ? [ Token #] + AllTrim( Str( ni ) ) + [("] + token( cStr, ".,!", ni, 3, @cPre, @cPost ) + ; - [") @ pos ] + Str( npos := attoken( cStr, ".,!", ni, 3 ), 3 ) + [, tokenized by "] + cPre + [" and "] + cPost + [" is ] + iif( SubStr( cStr,npos,1 ) $ ".,!", "", "not " ) + "empty." ) - next ni + [") @ pos ] + Str( npos := attoken( cStr, ".,!", ni, 3 ), 3 ) + [, tokenized by "] + cPre + [" and "] + cPost + [" is ] + iif( SubStr( cStr, npos, 1 ) $ ".,!", "", "not " ) + "empty." + NEXT ? ? "End test of TOKEN()" diff --git a/harbour/contrib/hbct/tests/token2.prg b/harbour/contrib/hbct/tests/token2.prg index 482adc5f8e..26ef533f41 100644 --- a/harbour/contrib/hbct/tests/token2.prg +++ b/harbour/contrib/hbct/tests/token2.prg @@ -66,7 +66,7 @@ PROCEDURE Main() LOCAL cStr1 := "A,BB,CCC,DDDD,EEEEE,FFFFFF" - //local cStr2 := "ZZZZZZ,YYYYY,XXXX,WWW,VV,U" +// LOCAL cStr2 := "ZZZZZZ,YYYYY,XXXX,WWW,VV,U" LOCAL cStr3 := "0123456789ABCDEFGHIJKLM" LOCAL cStr4 := "08:09:10:11:12" LOCAL cStr5 := "05:00+20:00+35:00+50:00" @@ -83,14 +83,14 @@ PROCEDURE Main() ? [ tokeninit(@cStr1, ",", 1) == .T. ? ----> ] + ltoc( tokeninit(@cStr1, ",", 1 ) ) ? [ tokennum() == 6 ? ---------------------> ] + Str( tokennum() ) ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) - WHILE( !tokenend() ) + WHILE !tokenend() ? [ tokennext(@cStr1) ------------------> "] + tokennext( @cStr1 ) + ["] ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) ENDDO ? ? [ rewind with tokeninit() == .T. ? ------> ] + ltoc( tokeninit() ) ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) - WHILE( !tokenend() ) + WHILE !tokenend() ? [ tokennext(@cStr1) ------------------> "] + tokennext( @cStr1 ) + ["] ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) ENDDO @@ -108,7 +108,7 @@ PROCEDURE Main() ? [ token environment of cStr1 !] ? [ rewind with tokeninit() == .T. ? ------> ] + ltoc( tokeninit() ) ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) - WHILE( !tokenend() ) + WHILE !tokenend() ? [ tokennext(@cStr3) ------------------> "] + tokennext( @cStr3 ) + ["] ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) ENDDO @@ -122,8 +122,8 @@ PROCEDURE Main() ENDDO ? ? [ access tokens directly with tokenat] - ? [ tokenat(.F.,2) == 3 ? ---------------> ] + Str( tokenat( .F., 2 ) ) - ? [ tokenat(.T.,4) == 14 ? --------------> ] + Str( tokenat( .T., 4 ) ) + ? [ tokenat( .F., 2 ) == 3 ? ---------------> ] + Str( tokenat( .F., 2 ) ) + ? [ tokenat( .T., 4 ) == 14 ? --------------> ] + Str( tokenat( .T., 4 ) ) ? ? "...Press any key..." @@ -133,16 +133,16 @@ PROCEDURE Main() ? [ Save global token environment with savetoken] cTE1 := savetoken() ? [ tokeninit a different string, cStr4 := "] + cStr4 + [", with tokeninit()] - ? [ tokeninit(@cStr4, ":", 1) == .T. ? ----> ] + ltoc( tokeninit( @cStr4, ":", 1 ) ) + ? [ tokeninit( @cStr4, ":", 1 ) == .T. ? ----> ] + ltoc( tokeninit( @cStr4, ":", 1 ) ) ? [ tokennum() == 5 ? ---------------------> ] + Str( tokennum() ) ? [ tokennext() == "08" ? ------------------> "] + tokennext( @cStr4 ) + ["] ? [ Now restore global token environment with resttoken and rewind it] resttoken( cTE1 ) tokeninit() - ? [ tokennum() == 6 ? ---------------------> ] + Str( tokennum() ) + ? [ tokennum() == 6 ? ----------------------> ] + Str( tokennum() ) ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) - WHILE( !tokenend() ) - ? [ tokennext(@cStr1) ------------------> "] + tokennext( @cStr1 ) + ["] + WHILE !tokenend() + ? [ tokennext( @cStr1 ) -----------------> "] + tokennext( @cStr1 ) + ["] ? [ tokenend() ? -------------------------> ] + ltoc( tokenend() ) ENDDO ? [ Release global TE with tokenexit() ----> ] + ltoc( tokenexit() ) @@ -155,17 +155,17 @@ PROCEDURE Main() ? [ Now tokenize cStr4 := "] + cStr4 + [" and] ? [ cStr5 := "] + cStr5 + ["] ? [ and store the token environment locally to cTE1 and cTE2:] - ? [ tokeninit(@cStr4, ":", 1, @cTE1) == .T. ? -> ] + ltoc( tokeninit(@cStr4, ":", 1, @cTE1 ) ) - ? [ tokeninit(@cStr5, "+", 1, @cTE2) == .T. ? -> ] + ltoc( tokeninit(@cStr5, "+", 1, @cTE2 ) ) - ? [ tokennum(@cTE1) == 5 ? --------------------> ] + Str( tokennum(@cTE1 ) ) - ? [ tokennum(@cTE2) == 4 ? --------------------> ] + Str( tokennum(@cTE2 ) ) - ? [ tokenend(@cTE1) ? ---------------------> ] + ltoc( tokenend(@cTE1 ) ) - ? [ tokenend(@cTE2) ? ---------------------> ] + ltoc( tokenend(@cTE2 ) ) - WHILE( !tokenend( @cTE1 ) .AND. !tokenend( @cTE2 ) ) - ? [ next train at ] + tokennext( cStr4,,@cTE1 ) + ":" + tokennext( cStr5,,@cTE2 ) - ? [ compiled with tokennext(cStr4,,@cTE1)+":"+tokennext(cStr5,,@cTE2)] - ? [ tokenend(@cTE1) ? ---------------------> ] + ltoc( tokenend(@cTE1 ) ) - ? [ tokenend(@cTE2) ? ---------------------> ] + ltoc( tokenend(@cTE2 ) ) + ? [ tokeninit( @cStr4, ":", 1, @cTE1 ) == .T. ? -> ] + ltoc( tokeninit( @cStr4, ":", 1, @cTE1 ) ) + ? [ tokeninit( @cStr5, "+", 1, @cTE2 ) == .T. ? -> ] + ltoc( tokeninit( @cStr5, "+", 1, @cTE2 ) ) + ? [ tokennum( @cTE1 ) == 5 ? --------------------> ] + Str( tokennum( @cTE1 ) ) + ? [ tokennum( @cTE2 ) == 4 ? --------------------> ] + Str( tokennum( @cTE2 ) ) + ? [ tokenend( @cTE1 ) ? ---------------------> ] + ltoc( tokenend( @cTE1 ) ) + ? [ tokenend( @cTE2 ) ? ---------------------> ] + ltoc( tokenend( @cTE2 ) ) + WHILE !tokenend( @cTE1 ) .AND. !tokenend( @cTE2 ) + ? [ next train at ] + tokennext( cStr4,, @cTE1 ) + ":" + tokennext( cStr5,, @cTE2 ) + ? [ compiled with tokennext( cStr4,, @cTE1 ) + ":" + tokennext( cStr5,, @cTE2 )] + ? [ tokenend( @cTE1 ) ? ---------------------> ] + ltoc( tokenend( @cTE1 ) ) + ? [ tokenend( @cTE2 ) ? ---------------------> ] + ltoc( tokenend( @cTE2 ) ) ENDDO ? diff --git a/harbour/contrib/hbct/tests/tokensep.prg b/harbour/contrib/hbct/tests/tokensep.prg index 5b0d96d86b..45a485b0ba 100644 --- a/harbour/contrib/hbct/tests/tokensep.prg +++ b/harbour/contrib/hbct/tests/tokensep.prg @@ -68,19 +68,19 @@ PROCEDURE Main() ? [ Tokenizing the string "] + cStr + ["] ? [ with skip width == 1 and ".,!" as tokenizer list:] ? - for ni := 1 TO numtoken( cStr, ".,!", 1 ) + FOR ni := 1 TO numtoken( cStr, ".,!", 1 ) ? [ Token #] + AllTrim( Str( ni ) ) + [("] + token( cStr, ".,!", ni, 1 ) + ; - [") is tokenized by "] + tokensep( .F. ) + [" and "] + tokensep( .T. ) + ["] ) - next ni + [") is tokenized by "] + tokensep( .F. ) + [" and "] + tokensep( .T. ) + ["] + NEXT ? ? [ Tokenizing the string "] + cStr + ["] ? [ with skip width == 3 and ".,!" as tokenizer list:] ? - for ni := 1 TO numtoken( cStr, ".,!", 3 ) + FOR ni := 1 TO numtoken( cStr, ".,!", 3 ) ? [ Token #] + AllTrim( Str( ni ) ) + [("] + token( cStr, ".,!", ni, 3 ) + ; - [") is tokenized by "] + tokensep( .F. ) + [" and "] + tokensep( .T. ) + ["] ) - next ni + [") is tokenized by "] + tokensep( .F. ) + [" and "] + tokensep( .T. ) + ["] + NEXT ? ? "End test of TOKENSEP()" diff --git a/harbour/contrib/hbct/tests/trig.prg b/harbour/contrib/hbct/tests/trig.prg index de45ec0e73..7a459573b6 100644 --- a/harbour/contrib/hbct/tests/trig.prg +++ b/harbour/contrib/hbct/tests/trig.prg @@ -74,19 +74,19 @@ PROCEDURE Main() ? "PI = " + Str( PI(), 18, 15 ) ? "STR( SIN( PI() / 4 ), 18, 15 ) = 0.707106781186548 // CT3" - ? Space( 32 ) + Str( SIN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( SIN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( SIN( PI() / 2 ), 18, 15 ) = 1.000000000000000 // CT3" - ? Space( 32 ) + Str( SIN( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( SIN( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( SIN( PI() * 99.5 ), 18, 15 ) = -1.000000000000000 // CT3" - ? Space( 35 ) + Str( SIN( PI() * 99.5 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 36 ) + Str( SIN( PI() * 99.5 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( SIN( PI() / 9 ), 18, 15 ) = 0.342020143325669 // CT3" - ? Space( 32 ) + Str( SIN( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( SIN( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" WAIT4() @@ -96,19 +96,19 @@ PROCEDURE Main() ? ? "STR( COS( PI() / 4 ), 18, 15 ) = 0.707106781186548 // CT3" - ? Space( 32 ) + Str( COS( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COS( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COS( PI() / 2 ), 18, 15 ) = 0.000000000000000 // CT3" - ? Space( 32 ) + Str( COS( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COS( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COS( PI() * 99.5 ), 18, 15 ) = 0.000000000000000 // CT3" - ? Space( 34 ) + Str( COS( PI() * 99.5 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 35 ) + Str( COS( PI() * 99.5 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COS( PI() / 9 ), 18, 15 ) = 0.939692620785908 // CT3" - ? Space( 32 ) + Str( COS( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COS( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" ? @@ -120,11 +120,11 @@ PROCEDURE Main() ? ? "STR( TAN( PI() / 4 ), 18, 15 ) = 1.000000000000000 // CT3" - ? Space( 32 ) + Str( TAN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( TAN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( TAN( PI() / 9 ), 18, 15 ) = 0.363970234266202 // CT3" - ? Space( 32 ) + Str( TAN( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( TAN( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" ? ? ? @@ -138,22 +138,22 @@ PROCEDURE Main() ? ? "STR( ATAN( PI() / 4 ), 18, 15 ) = 0.665773750028354 // CT3" - ? Space( 33 ) + Str( ATAN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( ATAN( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? WAIT4() ? "STR( COT( PI() / 4 ), 18, 15 ) = 1.000000000000000 // CT3" - ? Space( 32 ) + Str( COT( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COT( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COT( PI() / 2 ), 18, 15 ) = 0.000000000000000 // CT3" - ? Space( 32 ) + Str( COT( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COT( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COT( PI() / 9 ), 18, 15 ) = 2.747477419454622 // CT3" - ? Space( 32 ) + Str( COT( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 33 ) + Str( COT( PI() / 9 ), 18, 15 ) + " <-- CT for Harbour" ? WAIT4() @@ -161,30 +161,30 @@ PROCEDURE Main() ?? "Testing Hiperbolic Sine..." ? ? "STR( SINH( PI() / 2 ), 18, 15 ) = 2.301298902307295 // CT3" - ? Space( 33 ) + Str( SINH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( SINH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( SINH( PI() / 4 ), 18, 15 ) = 0.868670961486010 // CT3" - ? Space( 33 ) + Str( SINH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( SINH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "Testing Hiperbolic Cosine..." ? ? "STR( COSH( PI() / 2 ), 18, 15 ) = 2.509178478658057 // CT3" - ? Space( 33 ) + Str( COSH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( COSH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( COSH( PI() / 4 ), 18, 15 ) = 1.324609089252006 // CT3" - ? Space( 33 ) + Str( COSH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( COSH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? ? "Testing Hiperbolic Tangent..." ? ? "STR( TANH( PI() / 2 ), 18, 15 ) = 0.917152335667274 // CT3" - ? Space( 33 ) + Str( TANH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( TANH( PI() / 2 ), 18, 15 ) + " <-- CT for Harbour" ? ? "STR( TANH( PI() / 4 ), 18, 15 ) = 0.655794202632672 // CT3" - ? Space( 33 ) + Str( TANH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 34 ) + Str( TANH( PI() / 4 ), 18, 15 ) + " <-- CT for Harbour" ? WAIT4() @@ -192,23 +192,23 @@ PROCEDURE Main() ? "Testing Degree TO Radian..." ? ? "STR( DTOR( 360 ), 18, 15 ) = 6.283185307179588 // CT3" - ? Space( 27 ) + Str( DTOR( 360 ), 18, 15 ), " <-- CT for Harbour " + ? Space( 28 ) + Str( DTOR( 360 ), 18, 15 ), " <-- CT for Harbour " ? ? "STR( DTOR( 180 ), 18, 15 ) = 3.141592653589794 // CT3" - ? Space( 27 ) + Str( DTOR( 180 ), 18, 15 ), " <-- CT for Harbour " + ? Space( 28 ) + Str( DTOR( 180 ), 18, 15 ), " <-- CT for Harbour " ? ? "STR( DTOR( 180.5 ), 18, 15 ) = 3.150319299849766 // CT3" - ? Space( 29 ) + Str( DTOR( 180.5 ), 18, 15 ), " <-- CT for Harbour " + ? Space( 30 ) + Str( DTOR( 180.5 ), 18, 15 ), " <-- CT for Harbour " ? ? "STR( DTOR( 720 ), 18, 15 ) = 12.566370614359180 // CT3" - ? Space( 28 ) + Str( DTOR( 720 ), 18, 15 ), " <-- CT for Harbour " + ? Space( 29 ) + Str( DTOR( 720 ), 18, 15 ), " <-- CT for Harbour " ? ? "STR( DTOR( -180 ), 18, 15 ) = -3.141592653589794 // CT3" - ? Space( 29 ) + Str( DTOR( -180 ), 18, 15 ), " <-- CT for Harbour " + ? Space( 30 ) + Str( DTOR( -180 ), 18, 15 ), " <-- CT for Harbour " WAIT4() @@ -219,10 +219,10 @@ PROCEDURE Main() ? Space( 7 ), RTOD( PI() ), " <-- CT for Harbour " ? "RTOD( 2 * PI() ) = 360 // CT3 " - ? Space( 10 ), RTOD( 2 * PI() ), " <-- CT for Harbour " + ? Space( 11 ), RTOD( 2 * PI() ), " <-- CT for Harbour " ? "RTOD( 4 * PI() ) = 720 // CT3 " - ? Space( 10 ), RTOD( 4 * PI() ), " <-- CT for Harbour " + ? Space( 11 ), RTOD( 4 * PI() ), " <-- CT for Harbour " ? "RTOD( -PI() ) = -180 // CT3" ? Space( 9 ), RTOD( -PI() ), " <-- CT for Harbour " @@ -244,9 +244,9 @@ PROCEDURE Main() ? "y = COS( DTOR( 30 ) ) =", y ? ? "STR( ATN2( x, y ), 18, 15 ) = 0.523598775598299 // CT3" - ? Space( 31 ) + Str( ATN2( x, y ), 18, 15 ) + " <-- CT for Harbour" + ? Space( 30 ) + Str( ATN2( x, y ), 18, 15 ) + " <-- CT for Harbour" ? - ? "RTOD( ATN2( x, y ) ) =" + Str( RTOD( ATN2( x,y ) ), 18, 4 ) + " <-- CT for Harbour" + ? "RTOD( ATN2( x, y ) ) =" + Str( RTOD( ATN2( x, y ) ), 18, 4 ) + " <-- CT for Harbour" ? WAIT4()