diff --git a/APLSource/Execute-1.aplc b/APLSource/Execute-1.aplc index 878e4b7..c6fd975 100644 --- a/APLSource/Execute-1.aplc +++ b/APLSource/Execute-1.aplc @@ -1,56 +1,46 @@ -:Class Execute +:Class Execute ⍝ This class allows you two different things: ⍝ * Start a process and catch its return code. -⍝ * Start an application and catch its standard output. -⍝ +⍝ * Start an application and catch its standard output.\\ ⍝ The two goals are quite different and therefore handled by two -⍝ different methods: `Process` and `Application`. -⍝ +⍝ different methods: `Process` and `Application`.\\ ⍝ You would use `Application` in order to start... ⍝ * another instance of Dyalog from Dyalog. ⍝ * a console application from within Dyalog. ⍝ * any EXE from Dyalog. -⍝ * a batch script from Dyalog. -⍝ -⍝ When you need the actual output then you would use `Process`. Examples are: -⍝ +⍝ * a batch script from Dyalog.\\ +⍝ When you need the actual output then you would use `Process`. Examples are:\ ⍝ * Get a list with a SubVersion command. -⍝ * Get a directory listing with the console DIR command. -⍝ +⍝ * Get a directory listing with the console DIR command.\\ ⍝ Note that if you specify `/` as a delimiter at the beginning then `Execute` -⍝ enforces `\` characters for you. Example: -⍝ +⍝ enforces `\` characters for you. Example:\\ ⍝ ~~~ ⍝ #.Execute.Process'"C:/My Scripts/foo.bat" ⍝ this will work ⍝ ~~~ -⍝ ⍝ If however a parameter passed later on happens to be a directory name then ⍝ it is up to you to specify `\` rather than `/` as separator. Example: -⍝ ⍝ ~~~ ⍝ #.Execute.Process'CMD' 'dir C:/' 'Exit 199' ⍝ this won't work ⍝ ~~~ -⍝ ⍝ Thanks to Peter Michael Hager () without whom -⍝ this class would hardly exist. -⍝ -⍝ Author: Kai Jaeger ⋄ APL Team Ltd -⍝ -⍝ Home page: +⍝ this class would hardly exist.\\ +⍝ Author: Kai Jaeger ⋄ APL Team Ltd\\ +⍝ Home page: - :Include ##.APLTreeUtils + :Include APLTreeUtils okay←false←null←0 ⋄ true←1 ∇ r←Version :Access Public shared - r←(Last⍕⎕THIS)'1.9.0.2' '2018-02-19' + r←(Last⍕⎕THIS)'1.9.1.3' '2019-02-04' ∇ ∇ History :Access Public Shared - ⍝ * 1.9.0 - ⍝ * First version after conversion from the APL wiki to GitHub. + ⍝ * 1.9.1 + ⍝ * Bug fix: `:Include ##.APLTreeUtils` is now ':Include APLTreeUtils`. + ⍝ * Documentation corrected (home page link) and polished. ⍝\\ ⍝ For information regarding older versions see ∇ diff --git a/APLSource/TestCases-11/Test_ZZZ_999-e1.aplf b/APLSource/TestCases-11/Test_ZZZ_999-e1.aplf index 188bc1f..37a375d 100644 --- a/APLSource/TestCases-11/Test_ZZZ_999-e1.aplf +++ b/APLSource/TestCases-11/Test_ZZZ_999-e1.aplf @@ -1,5 +1,5 @@ - R←Test_ZZZ_999(stopFlag batchFlag);v;n;d;xml;rf;f1;f2;f3;⎕TRAP - ⍝ Check the "Version" function and publish.config and history.txt + R←Test_ZZZ_999(stopFlag batchFlag);v;n;d;xml;rf;f1;f2;⎕TRAP +⍝ Check the "Version" function and publish.config. ⎕TRAP←(999 'C' '. ⍝ Deliberate error')(0 'N') R←∆Failed @@ -7,6 +7,7 @@ ⍝ First we check whether "Version" returns a valid result: (n v d)←rf.Version + v←{⍵/⍨3>+\'.'=⍵}v ⍝ Remove build ID f1←~5≤⍴v f1∨←2≠'.'+.=v f1∨←~∧/⎕D∊⍨v~'.' @@ -14,25 +15,19 @@ f1∨←10≠⍴d f1∨←d[4 7+⎕IO]∨.≠'-' f1∨←~∧/⎕D∊⍨d~'-' + ⍝ publish.config must be in line with what "Version" returns of course: xml←⎕XML'flat'#.APLTreeUtils.ReadUtf8File'publish.config' f2←v≢(2+⎕IO)⊃xml[xml[;1+⎕IO]⍳⊂'version';] f2∨←d≢(2+⎕IO)⊃xml[xml[;1+⎕IO]⍳⊂'date';] -⍝ history.txt might be useful during development but must not exist -⍝ when the project is checked in: - f3←⎕NEXISTS'history.txt' - :If f1 ⎕←'Result of the "Version" function is invalid.' :EndIf :If f2 ⎕←'The contents of "publish.config" is not in line with "Version".' :EndIf - :If f3 - ⎕←'There is a file "history.txt" but there shouldn''t.' - :EndIf - →FailsIf f1∨f2∨f3 + →FailsIf f1∨f2 R←∆OK diff --git a/APLSource/r-0.aplf b/APLSource/r-0.aplf new file mode 100644 index 0000000..0440596 --- /dev/null +++ b/APLSource/r-0.aplf @@ -0,0 +1,2 @@ + r +⍝ No run function really!! diff --git a/Make/Make.DWS b/Make/Make.DWS index c30d022..ef7a567 100644 Binary files a/Make/Make.DWS and b/Make/Make.DWS differ diff --git "a/Tests/TestDir/\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271 \320\274\320\270\321\200.txt" "b/Tests/TestDir/\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271 \320\274\320\270\321\200.txt" deleted file mode 100644 index 59c5d2b..0000000 --- "a/Tests/TestDir/\320\227\320\264\321\200\320\260\320\262\321\201\321\202\320\262\321\203\320\271 \320\274\320\270\321\200.txt" +++ /dev/null @@ -1 +0,0 @@ -stuff \ No newline at end of file diff --git a/acre.config b/acre.config index b2890e5..48be96d 100644 --- a/acre.config +++ b/acre.config @@ -1 +1 @@ -[ CaseCode←'On' KeepHistory←'On' Open←'' ProjectSpace←'#._Execute' StartUp←'' ] \ No newline at end of file +[ CaseCode←'On' Open←'' ProjectSpace←'#._Execute' StartUp←'' ] \ No newline at end of file diff --git a/publish.config b/publish.config index 1812560..1df66c3 100644 --- a/publish.config +++ b/publish.config @@ -1 +1 @@ - 1.9.0 2018-02-19 #._Execute 1 Development 1 2 \ No newline at end of file + 1.9.1 2019-02-04 #._Execute 1 Development 1 3 \ No newline at end of file