以下是来自控制台的错误:
>> ? 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'不能正确减少?
答案 0 :(得分:2)
我不知道你是如何定义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]
无论如何,您可以尝试绑定a
:
>> reduce bind a 'column
== [5]