这是我在控制台中遇到的错误:
>> ? column
COLUMN is a block of value: [Person 2 Date 3 Quantity 4 Size 5 ProductType 6
LineItem 7 Deliver 8 FillStatus 9 Note 10 Time 11]
>> ? column/Size
COLUMN/SIZE is an integer of value: 5
>> ? a
A is a block of value: [column/Size]
>> reduce a
** Script Error: column word has no context
** Near: column/Size
>> ? b
B is a block of value: [column/Size]
>> reduce b
== [5]
为什么变量“a”没有正确减少?
最佳答案
我不知道你如何定义column
和a
,因为当我从控制台尝试它时,它起作用了:
>> column: [Person 2 Date 3 Quantity 4 Size 5 ProductType 6 LineItem 7 Deliver 8 FillStatus 9 Note 10 Time 11]
== [Person 2 Date 3 Quantity 4 Size 5 ProductType 6 LineItem 7 Deliver 8 FillStatus 9 Note 10 Time 11]
>> a: [column/size]
== [column/size]
>> reduce a
== [5]
无论如何,你可以尝试绑定(bind)a
:
>> reduce bind a 'column
== [5]
关于bind - rebol 程序中出现奇怪的 "word has no context"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23052875/