Changeset 39069 in project


Ignore:
Timestamp:
10/26/20 10:57:45 (5 weeks ago)
Author:
lassik
Message:

Edit for clarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/srfi-193

    r39068 r39069  
    1818
    1919Like the standard {{command-line}} procedure in R7RS and R6RS, this
    20 gives the command line as list of strings, with the first element
    21 (always present) being the command name and the remaining elements (if
    22 any) are command arguments. Unlike RnRS {{command-line}}, this is a
    23 parameter that can be bound to another value by the Scheme programmer
    24 if desired, for example for subcommand processing.
     20gives the command line as list of strings. The first element (always
     21present) is the command name and the remaining elements (if any) are
     22command arguments.
     23
     24Unlike RnRS {{command-line}}, this is a parameter that can be bound to
     25another value by the Scheme programmer if desired, for example for
     26subcommand processing.
    2527
    2628The value of this parameter should be a list of one or more strings at
    27 all times. Neither the strings nor the list should not be mutated. If
    28 the parameter is rebound to another list, the new list may share
    29 structure with the old list.
     29all times. Neither the strings nor the list should be mutated. If the
     30parameter is rebound to another list, the new list is permitted to
     31share structure with the old list.
    3032
    3133The default value of the parameter is more precisely specified than
    3234the value of RnRS {{command-line}}. When evaluating code in the csi
    33 REPL, such as via {{load}}, the command line is a one-element list
    34 whose only element is a zero-length string.
     35REPL, the command line is a one-element list whose only element is a
     36zero-length string.
    3537
    36 * When running a standalone program compiled via csi, the first
    37 element is the operating system's {{argv[0]}} and the remaining
    38 elements are {{argv[1]}} and up. However, {{-:}} arguments that control
    39 the Chicken runtime system are not part of the list.
     38When running a standalone program compiled via csc, the first element
     39is the operating system's {{argv[0]}} and the remaining elements are
     40{{argv[1]}} and up. However, any {{-:}} arguments that give options
     41for the Chicken runtime system are not part of the list.
    4042
    4143<procedure>(command-name)</procedure>
    4244
    4345Returns a simplified version of {{(car (command-line))}}, respecting
    44 the current binding of the {{command-line}} parameter. This is
    45 typically something suitable to display as the program name. For
    46 example, {{/path/to/foo.scm}} is simplified into {{foo}}.
     46the current binding of the {{command-line}} parameter.
     47
     48This is typically something suitable to display as the program name.
     49For example, {{/path/to/foo.scm}} is simplified into {{foo}}.
    4750
    4851However, if {{(car (command-line))}} is a zero-length string (such as
     
    8588
    8689  Copyright 2020 Lassi Kortela
    87 
     90 
    8891  Permission to use, copy, modify, and distribute this software for any
    8992  purpose with or without fee is hereby granted, provided that the above
    9093  copyright notice and this permission notice appear in all copies.
    91 
     94 
    9295  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
    9396  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
Note: See TracChangeset for help on using the changeset viewer.