From: George H. <geo...@us...> - 2006-10-21 10:55:05
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15517/win32forth/src Modified Files: Utils.f Log Message: gah:Added documentation Index: Utils.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/Utils.f,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Utils.f 3 Oct 2006 07:44:22 -0000 1.13 --- Utils.f 21 Oct 2006 10:54:55 -0000 1.14 *************** *** 51,55 **** \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! : .platform ( -- ) cr ." Platform: Windows " winver case --- 51,56 ---- \ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ! : .platform ( -- ) \ W32F Tools extra in-system ! \ *G Display the Windows platform the system is running on. cr ." Platform: Windows " winver case *************** *** 84,92 **** IN-APPLICATION ! : MessageBox ( szText szTitle style hOwnerWindow -- result ) dup NULL = if drop call GetActiveWindow then \ better use a valid handle >r 3reverse r> Call MessageBox ; ! : ?MessageBox ( flag adr len -- ) asciiz swap if z" Notice!" --- 85,97 ---- IN-APPLICATION ! : MessageBox ( szText szTitle style hOwnerWindow -- result ) \ W32F ! \ *G Display a standard windows message box, with the title sztitle and message sztext, ! \ ** where both strings are null terminated. Style is one of the standard window message ! \ ** box styles. If hOwnerWindow is null then the active window is used as the owner. dup NULL = if drop call GetActiveWindow then \ better use a valid handle >r 3reverse r> Call MessageBox ; ! : ?MessageBox ( flag addr len -- ) \ W32F ! \ *G If flag is true display the text addr len in a modal information message box. asciiz swap if z" Notice!" *************** *** 95,99 **** then drop ; ! : ?ErrorBox ( flag adr len -- ) asciiz swap if z" Application Error" --- 100,106 ---- then drop ; ! : ?ErrorBox ( flag addr len -- ) \ W32F ! \ *G If flag is true display the text addr len in a modal warning message box. If OK is ! \ ** pressed then perform an abort, if cancel is pressed terminate the application. asciiz swap if z" Application Error" *************** *** 106,110 **** then ; ! : ?TerminateBox ( flag adr len -- ) asciiz swap if z" Error Notice!" --- 113,119 ---- then ; ! : ?TerminateBox ( flag addr len -- ) \ W32F ! \ *G If flag is true display the text addr len in a modal stop message box. When OK is ! \ ** pressed terminate the application. asciiz swap if z" Error Notice!" *************** *** 115,119 **** then ; ! : ErrorBox ( adr len -- ) asciiz z" Application Error" --- 124,129 ---- then ; ! : ErrorBox ( addr len -- ) \ W32F ! \ *G Display the text addr len in a modal error message box. asciiz z" Application Error" *************** *** 121,125 **** NULL MessageBox drop ; ! : .ErrorBox ( n - ) \ displays n in a MessageBox 0 (d.) ErrorBox ; --- 131,136 ---- NULL MessageBox drop ; ! : .ErrorBox ( n - ) \ W32F ! \ *G Display the number n in a modal error message box. 0 (d.) ErrorBox ; *************** *** 216,223 **** EXTERNAL \ external definitions start here ! : $edit ( line filename | dummy -1 -- ) ['] do-edit [$edit] ; ! : $browse ( line filename | dummy -1 -- ) ['] do-browse [$edit] ; --- 227,236 ---- EXTERNAL \ external definitions start here ! : $edit ( line filename | dummy -1 -- ) \ W32F ! \ *G Open the file, filename in the editor at line, in edit mode. ['] do-edit [$edit] ; ! : $browse ( line filename | dummy -1 -- ) \ W32F ! \ *G Open the file, filename in the editor at line, in browse mode. ['] do-browse [$edit] ; *************** *** 797,804 **** in-system ! : 2literal ( d1 -- ) swap POSTPONE LITERAL POSTPONE LITERAL ; immediate ! : MACRO ( "name <char> ccc<char>" -- ) : char parse POSTPONE sliteral --- 810,828 ---- in-system ! : 2literal ( x1 x2 -- ) \ ANSI Double ! \ *G \b Interpretation: \d Interpretation semantics for this word are undefined. \n ! \ ** \b Compilation: \d ( x1 x2 -- ) ! \ ** Append the run-time semantics below to the current definition. \n ! \ ** \b Run-time: \d ( -- x1 x2 ) ! \ ** Place cell pair x1 x2 on the stack. swap POSTPONE LITERAL POSTPONE LITERAL ; immediate ! : MACRO ( "name <char> ccc<char>" -- ) \ W32F (Wil Baden) ! \ *G Create a definiton, "name and store the text cccc delimited by <char> so that when ! \ ** "name is used the code is compiled or executed according to state. \n ! \ ** \b Note: \d Because "name uses evaluate then the actual interpretation is sensitive to the ! \ ** search order when "name is compiled or interpreted, \b not \d when defined. \n ! \ ** Also "name should not be postponed into a word or stored into a deferred word, ! \ ** which is called in a turnkeyed application (it causes the application to crash). : char parse POSTPONE sliteral |