Skip to content

Commit

Permalink
Merge pull request #92 from skx/89-examples
Browse files Browse the repository at this point in the history
89 examples
  • Loading branch information
skx authored Nov 12, 2023
2 parents 8f86ab9 + d85e819 commit 0ed5fb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/env.mon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ puts( "Your home is ", os.getenv("HOME"), "\n" );

// Split $PATH into fields, based upon the `:` character
puts( "Directories on your system PATH\n");
let paths = string.split( os.getenv("PATH"), ":" );
let paths = os.getenv("PATH").split(":");

// Loop over the results
let i = 0;
Expand All @@ -35,4 +35,4 @@ puts( "Environment dump\n");
for( i < len(keys) ) {
puts( keys[i], "=", hash[keys[i]], "\n");
i++;
}
}
6 changes: 3 additions & 3 deletions examples/sort.mon
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@


// Dump the array.
function dump( in ) {
if ( in.sorted?() ) {
function dump( input ) {
if ( input.sorted?() ) {
puts( "\tThe array is sorted\n");
} else {
puts( "\tThe array is not sorted\n");
Expand All @@ -31,4 +31,4 @@ puts( "Original Array: " , string(a), "\n" );
dump(a);
let a = a.sort();
puts( "Sorted Array: " , string(a), "\n" );
dump(a);
dump(a);

0 comments on commit 0ed5fb8

Please sign in to comment.