public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: cgen@sources.redhat.com
Subject: Typo: .substr in pmacros.texi is .substring in pmacros.scm
Date: Mon, 28 Jan 2002 10:57:00 -0000	[thread overview]
Message-ID: <200201281857.TAA09595@ignucius.axis.se> (raw)

Please consider applying this patch.  It would IMHO be very useful
if .sym-built symbols were .pmacro-expanded, as I initially thought.
For example, a .pmacro could apply .sym on an argument and create
references to other, specialized .pmacro:s.  Currently this can be
accomplished only with the apparently frowned-upon "(.eval
(pmacro-expand '(.sym arg -something)))".  If you want, I guess I
can elaborate.

2002-01-28  Hans-Peter Nilsson  <hp@axis.com>

	* doc/pmacros.texi: Fix .substr typo to .substring.
	Mention that .sym expansions are not further expanded.

Index: pmacros.texi
===================================================================
RCS file: /cvs/src/src/cgen/doc/pmacros.texi,v
retrieving revision 1.2
diff -p -c -r1.2 pmacros.texi
*** pmacros.texi	2001/03/19 03:36:24	1.2
--- pmacros.texi	2002/01/28 18:33:26
*************** Preprocessor macros provide a way of sim
*** 21,27 ****
  * Convert a number to a hex::     The @code{.hex} builtin
  * Convert a string to uppercase:: The @code{.upcase} builtin
  * Convert a string to lowercase:: The @code{.downcase} builtin
! * Getting part of a string::      The @code{.substr} builtin
  * List splicing::                 The @code{.splice} builtin
  * Number generation::             The @code{.iota} builtin
  * Mapping a macro over a list::   The @code{.map} builtin
--- 21,27 ----
  * Convert a number to a hex::     The @code{.hex} builtin
  * Convert a string to uppercase:: The @code{.upcase} builtin
  * Convert a string to lowercase:: The @code{.downcase} builtin
! * Getting part of a string::      The @code{.substring} builtin
  * List splicing::                 The @code{.splice} builtin
  * Number generation::             The @code{.iota} builtin
  * Mapping a macro over a list::   The @code{.map} builtin
*************** Acceptable arguments are symbols, string
*** 144,150 ****
  The result is a symbol with the arguments concatenated together.
  Numbers are converted to a string, base 10, and then to a symbol.
  The result must be a valid Scheme symbol with the additional restriction
! that the first character must be a letter.
  
  @node String concatenation
  @section String concatenation
--- 144,151 ----
  The result is a symbol with the arguments concatenated together.
  Numbers are converted to a string, base 10, and then to a symbol.
  The result must be a valid Scheme symbol with the additional restriction
! that the first character must be a letter.  The result is not further
! expanded, regardless of whether there's a macro by that name.
  
  @node String concatenation
  @section String concatenation
*************** Example:
*** 222,232 ****
  
  @node Getting part of a string
  @section Getting part of a string
! @cindex .substr
  
! Extract a part of a string with @code{.substr}.
  
! Syntax: @code{(.substr string start end)}
  
  where @samp{start} is the starting character, and @samp{end} is one past
  the ending character.  Character numbering begins at position 0.
--- 223,233 ----
  
  @node Getting part of a string
  @section Getting part of a string
! @cindex .substring
  
! Extract a part of a string with @code{.substring}.
  
! Syntax: @code{(.substring string start end)}
  
  where @samp{start} is the starting character, and @samp{end} is one past
  the ending character.  Character numbering begins at position 0.
*************** string is returned.
*** 236,242 ****
  Example:
  
  @smallexample
! (.substr "howzitgoineh?" 2 6) --> "wzit"
  @end smallexample
  
  @node List splicing
--- 237,243 ----
  Example:
  
  @smallexample
! (.substring "howzitgoineh?" 2 6) --> "wzit"
  @end smallexample
  
  @node List splicing

brgds, H-P

             reply	other threads:[~2002-01-28 18:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-28 10:57 Hans-Peter Nilsson [this message]
2002-01-28 11:05 ` Frank Ch. Eigler
2002-03-19  7:00   ` Hans-Peter Nilsson
2002-03-19  8:03     ` Frank Ch. Eigler
2002-03-19  8:14     ` Doug Evans
2002-03-19 12:19       ` Recursive expansion of pmacros (was: Re: Typo: .substr in pmacros.texi is .substring in pmacros.scm) Hans-Peter Nilsson
2002-03-19 12:24         ` Doug Evans
2002-03-19 13:20           ` Hans-Peter Nilsson
2002-03-19 13:24             ` Doug Evans
2002-03-19 13:53               ` Hans-Peter Nilsson
2002-03-19 14:47                 ` Doug Evans
2002-03-20 11:15                   ` Hans-Peter Nilsson
2002-03-22  9:11                     ` Doug Evans
2002-03-19  8:15     ` Typo: .substr in pmacros.texi is .substring in pmacros.scm Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201281857.TAA09595@ignucius.axis.se \
    --to=hans-peter.nilsson@axis.com \
    --cc=cgen@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).