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

Invalid Path Value

 [1/7] from: smithry:us:ibm at: 30-Nov-2000 5:15


Can anyone help me with what I am doing wrong at the end of this screen dump? Thank you.
>> rotation-file
== ["1,2,3,4,5" "1,2,3,5,4" "1,2,4,3,5" "1,2,4,5,3" "1,2,5,3,4" 1,2,5,4,3 "1,3,4 ,2,5" "1,3,4,5,2" "1,3,5,2,4" "1,3,5,4,2" "1,3,2,...
>> rotation-count
== 1
>> type? rotation-file
== block!
>> type? rotation-count
== integer!
>> print rotation-file
1,2,3,4,5 1,2,3,5,4 1,2,4,3,5 1,2,4,5,3 1,2,5,3,4 1,2,5,4,3 1,3,4,2,5 1,3,4,5,2 1, 3,5,2,4 1,3,5,4,2 1,3,2,4,5 1,3,2,5,4 1,4,5,2,3 1,4,5,3,2 1,4,2,3,5 1,4,2,5,3 1,4, 3,2,5 1,4,3,5,2 1,5,2,3,4 1,5,2,4,3 1,5,3,2,4 1,5,3,4,2 1,5,4,2,3 1,5,4,3,2 2,3,4, 1,5 2,3,4,5,1 2,3,5,1,4 2,3,5,4,1 2,3,1,4,5 2,3,1,5,4 2,4,5,1,3 2,4,5,3,1 2,4,1,3, 5 2,4,1,5,3 2,4,3,1,5 2,4,3,5,1 2,5,1,3,4 2,5,1,4,3 2,5,3,1,4 2,5,3,4,1 2,5,4,1,3 2,5,4,3,1 2,1,3,4,5 2,1,3,5,4 2,1,4,3,5 2,1,4,5,3 2,1,5,3,4 2,1,5,4,3 3,4,5,1,2 3, 4,5,2,1 3,4,1,2,5 3,4,1,5,2 3,4,2,1,5 3,4,2,5,1 3,5,1,2,4 3,5,1,4,2 3,5,2,1,4 3,5, 2,4,1 3,5,4,1,2 3,5,4,2,1 3,1,2,4,5 3,1,2,5,4 3,1,4,2,5 3,1,4,5,2 3,1,5,2,4 3,1,5, 4,2 3,2,4,1,5 3,2,4,5,1 3,2,5,1,4 3,2,5,4,1 3,2,1,4,5 3,2,1,5,4 4,5,1,2,3 4,5,1,3, 2 4,5,2,1,3 4,5,2,3,1 4,5,3,1,2 4,5,3,2,1 4,1,2,3,5 4,1,2,5,3 4,1,3,2,5 4,1,3,5,2 4,1,5,2,3 4,1,5,3,2 4,2,3,1,5 4,2,3,5,1 4,2,5,1,3 4,2,5,3,1 4,2,1,3,5 4,2,1,5,3 4, 3,5,1,2 4,3,5,2,1 4,3,1,2,5 4,3,1,5,2 4,3,2,1,5 4,3,2,5,1 5,1,2,3,4 5,1,2,4,3 5,1, 3,2,4 5,1,3,4,2 5,1,4,2,3 5,1,4,3,2 5,2,3,1,4 5,2,3,4,1 5,2,4,1,3 5,2,4,3,1 5,2,1, 3,4 5,2,1,4,3 5,3,4,1,2 5,3,4,2,1 5,3,1,2,4 5,3,1,4,2 5,3,2,1,4 5,3,2,4,1 5,4,1,2, 3 5,4,1,3,2 5,4,2,1,3 5,4,2,3,1 5,4,3,1,2 5,4,3,2,1
>> print rotation-count
1
>> print rotation-file/1
1,2,3,4,5
>> print rotation-file/rotation-count
** Script Error: Invalid path value: rotation-count. ** Where: print rotation-file/rotation-count
>>
Ryan Smith Storage Operations Center [smithry--us--ibm--com] 303-924-3766

 [2/7] from: roy:wetherall:documentum at: 30-Nov-2000 13:03


You could try something like this ...
>> block: [a b c d e f g h i j]
== [a b c d e f g h i j]
>> index: 2
== 2
>> block/2
== b
>> value: to-path compose [block (index)]
== block/2
>> print value
b Roy

 [3/7] from: riachtchenko:docutec at: 30-Nov-2000 14:24


Hi Roy, yah, which in python just
>>> idx=2 >>> l=[4,2,5567] >>> l[idx]
5567 :) Wetherall, Roy wrote:

 [4/7] from: allenk:powerup:au at: 30-Nov-2000 23:36


----- Original Message ----- From: "Ryan Smith" <[smithry--us--ibm--com]> To: <[rebol-list--rebol--com]> Sent: Thursday, November 30, 2000 10:15 PM Subject: [REBOL] Invalid Path Value
> Can anyone help me with what I am doing wrong at the end of this screen > dump? > > Thank you.
<-SNIPPED CODE->
> >> print rotation-count > 1
<<quoted lines omitted: 4>>
> ** Where: print rotation-file/rotation-count > >>
Hi Ryan, If you want to use the value of rotation-count rather than the word rotation-count as the path then you can use this notation. print rotation-file/:rotation-count Using the colon "gets" the value of the word rotation-count Cheers, Allen K

 [5/7] from: arolls:bigpond:au at: 1-Dec-2000 0:44


Ryan, you want: rotation-file/:rotation-count See this:
>> a: [10 20 30]
== [10 20 30]
>> b: 2
== 2
>> a/b
** Script Error: Invalid path value: b. ** Where: a/b
>> a/:b
== 20 Anton.

 [6/7] from: jelinem1:nationwide at: 30-Nov-2000 7:56


An easy question to answer - even I could do it!
>> print rotation-count
1
>> print rotation-file/1
1,2,3,4,5
>> print rotation-file/:rotation-count
Note the colon in front of rotation-count. This will evaluate the word before using it as part of the path. Fortunately REBOL has very little syntax like this that you have to remember. - Michael Jelinek Ryan Smith <[smithry--us--ibm--com]>@rebol.com on 11/30/2000 06:15:51 AM From: "Ryan Smith" <[smithry--us--ibm--com]>@rebol.com on 11/30/2000 06:15 AM Please respond to [rebol-list--rebol--com] Sent by: [rebol-bounce--rebol--com] To: [rebol-list--rebol--com] cc: Subject: [REBOL] Invalid Path Value Can anyone help me with what I am doing wrong at the end of this screen dump? Thank you.
>> rotation-file
== ["1,2,3,4,5" "1,2,3,5,4" "1,2,4,3,5" "1,2,4,5,3" "1,2,5,3,4" 1,2,5,4,3 "1,3,4 ,2,5" "1,3,4,5,2" "1,3,5,2,4" "1,3,5,4,2" "1,3,2,...
>> rotation-count
== 1
>> type? rotation-file
== block!
>> type? rotation-count
== integer!
>> print rotation-file
1,2,3,4,5 1,2,3,5,4 1,2,4,3,5 1,2,4,5,3 1,2,5,3,4 1,2,5,4,3 1,3,4,2,5 1,3,4,5,2 1, 3,5,2,4 1,3,5,4,2 1,3,2,4,5 1,3,2,5,4 1,4,5,2,3 1,4,5,3,2 1,4,2,3,5 1,4,2,5,3 1,4, 3,2,5 1,4,3,5,2 1,5,2,3,4 1,5,2,4,3 1,5,3,2,4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,2,3,4,5
>> print rotation-file/rotation-count
** Script Error: Invalid path value: rotation-count. ** Where: print rotation-file/rotation-count
>>
Ryan Smith Storage Operations Center [smithry--us--ibm--com] 303-924-3766

 [7/7] from: al:bri:xtra at: 1-Dec-2000 10:13


> >> print rotation-file/rotation-count > ** Script Error: Invalid path value: rotation-count. > ** Where: print rotation-file/rotation-count
Try: rotation-file/:rotation-count Note the colon ":" which means "get" the value of the following word, instead of using the word literally. You also may be interested in looking at the object! datatype. Andrew Martin

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted