[REBOL] More syntax/documentation Q's Re:(2)

1999-11-30 Thread strejcek


 Hi, 


I try just something very ugly and it works: 

 1. x/:i  syntax can get but not set values in a block... why?
 
 Script started on Mon Nov 29 14:07:07 1999
 l
  x: [ "this" "is" "a" "test" ]
 == ["this" "is" "a" "test"]
  i: 3
 == 3
  x/:i
 == "a"
 
  ;  but all attempts to set x/:i seem to fail
 
  x/:i: "the"
 ** Syntax Error: Invalid word -- :i:.
 ** Where: (line 1) x/:i: "the"


 do rejoin compose [ "x/"(:i)": " "{the}"]
== ["this" "is" "the" "test"]   


(I know, it's ugly :-).

Jan

--
Jan Strejcek
[EMAIL PROTECTED]



[REBOL] More syntax/documentation Q's Re:(2)

1999-11-30 Thread giesse

[EMAIL PROTECTED] wrote:

 2. y: make string! 100   creates a string of length 0... why?
 rebol dictionary entry implies 100 would be length or
 value...
 
 IMHO, it's a big fat bug. The same happens with blocks BTW. I just reported
 both as a bug.

I think "make string! 100" should create an empty string with the
space to hold 100 characters.

Ciao,
/Gabriele./
o) .-^-. (--o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o) `-v-' (--o



[REBOL] More syntax/documentation Q's Re:(2)

1999-11-30 Thread sqlab

Hi

I do not cease to object (in part:) to the REBOL creator.

Carl wrote: 
"Note that using MAKE like this is really not necessary.
"REBOL strings automatically grow in size.  That
"is, you can create a string of size 1, then add 99 chars to it
"w/o a problem.  The MAKE is only used for efficiency, when you
"know the length of the string you want.

According my experience with Rebol and sockets, it's a need a allocate a
buffer for read-io. 
Of course that does not make the above saying wrong, but shows, that
sometimes you have to provide enough memory.

Regards
AR

-- 
Sent through Global Message Exchange - http://www.gmx.net