public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* Typo: .substr in pmacros.texi is .substring in pmacros.scm
@ 2002-01-28 10:57 Hans-Peter Nilsson
  2002-01-28 11:05 ` Frank Ch. Eigler
  0 siblings, 1 reply; 14+ messages in thread
From: Hans-Peter Nilsson @ 2002-01-28 10:57 UTC (permalink / raw)
  To: cgen

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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2002-03-22 17:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-28 10:57 Typo: .substr in pmacros.texi is .substring in pmacros.scm Hans-Peter Nilsson
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

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).