Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: BASIC-like string functions

From: joel:neely:fedex at: 27-Aug-2001 17:32

Hi, Gregg, Gregg Irwin wrote:
> Ramping up on REBOL after being a BASIC/VB guy, I didn't see > any words that equate to BASIC's Left, Right, and Mid which > return their respective part (left, right, or middle) of a > given string... > For example, is there a way to do it without using copy > (as in the second version of right), or is copy the right > way to go? >
If you really want to "equate to BASIC's" string functions, then you will want to copy, as that's the real behavior of BASIC. If you use the non-copying version of Right, and subsequently modify the resulting string value, you'll find that you've also changed the original, due to sharing of the underlying sequence of characters. -jn- -- ------------------------------------------------------------ Programming languages: compact, powerful, simple ... Pick any two! joel'dot'neely'at'fedex'dot'com