DO Writ_it_out WITH " rest_it = SUBSTR(ye_old_it, b_stop+1)| IF '->'$mid_it| new_it = &" + "mid_it| ye_old_it = front_it + STRVALUE(new_it) + rest_it", 3
DO Writ_it_out WITH " ELSE| ye_old_it = front_it + STRVALUE(&" + "mid_it) + rest_it| ENDIF| NEXT| RETURN(ye_old_it)| |********************", 3
*******************
* Func Occurence
*******************
DO Writ_it_out WITH "| |FUNCTION Occurence| | PARAMETERS astring, bstring| | return_cnt = 0| | DO WHILE !EMPTY(AT(astring, bstring))", 3
DO Writ_it_out WITH " return_cnt = return_cnt + 1| bstring = SUBSTR(bstring, AT(astring, bstring) + 1)| ENDDO| | RETURN(return_cnt)", 3
******************
* Func Strvalue
******************
DO Writ_it_out WITH "| |********************| |FUNCTION Strvalue| | PARAMETERS showstring| | DO CASE| CASE TYPE('showstring') = 'C'", 3
DO Writ_it_out WITH " RETURN(showstring)| CASE TYPE('showstring') = 'N'| RETURN(STR(showstring))| CASE TYPE('showstring') = 'M'| RETURN(' ')", 3
DO Writ_it_out WITH " CASE TYPE('showstring') = 'D'| RETURN(DTOC(showstring))| OTHERWISE| RETURN(IF(showstring, 'True', 'False'))| ENDCASE", 3
******************
* Func Print_case
******************
DO Writ_it_out WITH "| |********************| |FUNCTION Print_case| | DO CASE| CASE print_way = 1", 3
DO Writ_it_out WITH "| @ 0,0 CLEAR| CASE print_way = 2| SET PRINT OFF| SET CONSOLE ON", 3
DO Writ_it_out WITH "| IF TYPE('_a_scr') = 'U'| PUBLIC _a_scr| _a_scr = SAVESCREEN(10,10,12,70)| ELSE", 3
DO Writ_it_out WITH "| RESTSCREEN(10,10,12,70,_a_scr)| ENDIF| @ 10,10 CLEAR TO 12,70", 3
DO Writ_it_out WITH "| @ 10,10 TO 12,70 DOUBLE| IF ISPRINTER()| @ 11,25 SAY 'Printing Out Report. One Moment!'| ELSE", 3
DO Writ_it_out WITH "| @ 11,18 SAY 'Your Printer is OFF LINE. Any key to Continue'| INKEY(0)| RESTSCREEN(10,10,12,70,_a_scr)", 3
DO Writ_it_out WITH "| RETURN(.F.)| ENDIF| SET CONSOLE OFF| SET PRINT ON| CASE print_way = 3| SET CONSOLE ON", 3
DO Writ_it_out WITH "| @ 0,0 CLEAR| @ 10,10 TO 12,70 DOUBLE| @ 11,15 SAY 'Printing Out Report ==> ' + TRIM(sstfile) + '. One Moment!'", 3
DO Writ_it_out WITH "| print_file = TRIM(sstfile)| SET CONSOLE OFF| SET ALTERNATE ON| SET ALTERNATE TO &print_file.| ENDCASE| RETURN(.T.)", 3
********************
* Func Parsing
********************
DO Writ_it_out WITH "|********************||FUNCTION Parsing|| PARAMETERS getstring, for_code|| IF PCOUNT() = 1", 3
DO Writ_it_out WITH " for_code = .F.| ENDIF|| IF for_code| whereat = AT(CHR(124), getstring)| ELSE", 3
DO Writ_it_out WITH "| whereat = IF(EMPTY(AT('+', getstring)), AT('/', getstring), AT('+', getstring))", 3
DO Writ_it_out WITH "| ENDIF| newstring = IF(!EMPTY(whereat), SUBSTR(getstring, 1, whereat - 1), getstring)", 3
DO Writ_it_out WITH "| getstring = IF(!EMPTY(whereat), SUBSTR(getstring, whereat + 1), '')", 3
DO Writ_it_out WITH "| RETURN(newstring)", 3
********************
* Proc End_way2
********************
DO Writ_it_out WITH "********************|PROCEDURE End_way2|| PARAMETERS line_no, the_cent, a_row, a_col, a_row2, a_col2", 3
DO Writ_it_out WITH " IF PCOUNT() = 4| a_row2 = a_row| a_col2 = a_col| ENDIF|| DO CASE| CASE print_way = 1", 3
DO Writ_it_out WITH " @ 24,00 SAY 'End of Report. Press Any key to RETURN '| INKEY(0)| CASE print_way = 2", 3
DO Writ_it_out WITH " SET CONSOLE OFF| SET PRINT ON| IF the_cent > 0| skipping = breakpoint| DO WHILE skipping <= 55", 3
DO Writ_it_out WITH " ?| skipping = skipping + 1| ENDDO| IF LASTKEY() = 27| ? MESS_CENT('Partial Report Printed', the_cent)", 3
DO Writ_it_out WITH " ELSE| ? MESS_CENT('End of Report', the_cent)| ENDIF| EJECT| IF screject", 3
DO Writ_it_out WITH " EJECT| ENDIF| ENDIF| SET CONSOLE ON| SET PRINT OFF| DO Clear_area WITH a_row-1, a_col-5, a_row+3, a_col+65", 3
DO Writ_it_out WITH " SAVE SCREEN| @ a_row, a_col - 5 TO a_row + 2, a_col + 60 DOUBLE| @ a_row + 1, a_col SAY 'Requested Information has been Printed. Any Key to RETURN'", 3
DO Writ_it_out WITH " INKEY(0)| RESTORE SCREEN| OTHERWISE| IF TYPE('the_cent') = 'U'| the_cent = 0| ENDIF", 3
DO Writ_it_out WITH " IF the_cent > 0| ?| ?| ? MESS_CENT('End of Report', the_cent)| ENDIF|| SET ALTERNATE OFF", 3
DO Writ_it_out WITH " SET ALTERNATE TO| CLOSE ALTERNATE| SET CONSOLE ON| SAVE SCREEN| SCROLL(a_row, a_col, a_row + 2, a_col + 60, 0)", 3
DO Writ_it_out WITH " @ a_row, a_col TO a_row + 2, a_col + 60 DOUBLE| say_what = TRIM(print_file) + ' is now on the disk. Any key to RETURN'", 3
DO Writ_it_out WITH " @ a_row + 1, CENTER(say_what, 30) + a_col SAY say_what| INKEY(0)| RESTORE SCREEN| ENDCASE", 3
DO Writ_it_out WITH "", 4 && Close the window display