SET NOVERIFY DECLARE FLAG PIC X DEFAULT VALUE IS "Y". DECLARE TEMP PIC XXXX. DECLARE UIC PIC 9(7) DEFAULT VALUE IS 4194305. ! PRINT "" PRINT " Testing the NF$ functions, Nightly Functions, added to Datatrieve." PRINT " Before each of the following simple tests you will be informed what" PRINT " output to expect. This should take less than 5 minutes." PRINT "" FLAG = *."Y if this is NOT a hardcopy terminal" FLAG = FN$UPCASE(FLAG) ! ! Test #1 ! IF FLAG EQ "Y" THEN PRINT NF$CHAR(27) || "[H" || NF$CHAR(27) || "[J" ! PRINT "" PRINT " The following should print the letter A and the word DOG" SET VERIFY PRINT NF$CHAR(65), NF$CHAR(68) | NF$CHAR(79) | NF$CHAR(71) USING X(3) SET NOVERIFY ! TEMP = *."any letter and the press RETURN to continue" ! ! Test #2 ! IF FLAG EQ "Y" THEN PRINT NF$CHAR(27) || "[H" || NF$CHAR(27) || "[J" ! PRINT "" PRINT " The following should show the devices that begin with" PRINT " the letter D, i. e. disks." PRINT "" ! SET VERIFY NF$SPAWN("SHOW DEVICE D") ! SET NOVERIFY ! TEMP = *."any letter and the press RETURN to continue" ! ! Test #3 ! IF FLAG EQ "Y" THEN PRINT NF$CHAR(27) || "[H" || NF$CHAR(27) || "[J" ! PRINT "" PRINT " The following should print [100,1]." SET VERIFY PRINT NF$FAO("!%U", UIC) SET NOVERIFY ! TEMP = *."any letter and the press RETURN to continue" ! ! Test #4 ! IF FLAG EQ "Y" THEN PRINT NF$CHAR(27) || "[H" || NF$CHAR(27) || "[J" ! PRINT "" PRINT " The following should print 27 in:" PRINT " Decimal: 0027" PRINT " Hex: 001B" PRINT " Octal: 0033" SET VERIFY PRINT NF$FAO("!ZW", 27) USING 9(4), NF$FAO("!XW", 27) USING X(4), NF$FAO("!OW", 27) USING 9(4) SET NOVERIFY ! TEMP = *."any letter and the press RETURN to continue" ! ! Test #5 ! IF FLAG EQ "Y" THEN PRINT NF$CHAR(27) || "[H" || NF$CHAR(27) || "[J" ! PRINT "" PRINT " The following should print -1, 0, 0, -1, 0" SET VERIFY PRINT NF$BIT_TEST(18, 4), NF$BIT_TEST(18, 3), NF$BIT_TEST(18,2), NF$BIT_TEST(18, 1), NF$BIT_TEST(18, 0) SET NOVERIFY ! TEMP = *."any letter and the press RETURN to continue" ! PRINT "" PRINT " This concludes the test of the NF$ functions." PRINT "" EXIT