PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.9.1
Code Block Pro – Beautiful Syntax Highlighting v1.9.1
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / samples / stata.sample

stata.sample in Code Block Pro – Beautiful Syntax Highlighting 1.9.1, at build/shiki/samples/stata.sample

31 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 capture program drop exit_message
2 program exit_message
3 syntax, rc(int) progname(str) start_time(str) [CAPture]
4 local end_time "$S_TIME $S_DATE"
5 local time "Start: `start_time'" _n(1) "End: `end_time'"
6 di ""
7 if (`rc' == 0) {
8 di "End: $S_TIME $S_DATE"
9 local paux ran
10 local message "`progname' finished running" _n(2) "`time'"
11 local subject "`progname' `paux'"
12 }
13 else if ("`capture'" == "") {
14 di "WARNING: $S_TIME $S_DATE"
15 local paux ran with non-0 exit status
16 local message "`progname' ran but Stata gave error code r(`rc')" _n(2) "`time'"
17 local subject "`progname' `paux'"
18 }
19 else {
20 di "ERROR: $S_TIME $S_DATE"
21 local paux ran with errors
22 local message "`progname' stopped with error code r(`rc')" _n(2) "`time'"
23 local subject "`progname' `paux'"
24 }
25 di "`subject'"
26 di ""
27 di "`message'"
28 end
29
30 * From https://github.com/mcaceresb/stata-gtools/blob/fad519ef0454936d450802ac732728ba953957ac/src/test/gtools_tests.do
31