Update NaturalLib - count.ring
@@ -17,6 +17,17 @@ class Count
CommandData()[:nExpr]++
CommandData()[:aExpr] + nValue
if CommandData()[:nExpr] = 2 {
+ Count_Execute()
+ }
+ }
+ }
+
+ func AddAttributes_Count
+ AddAttribute(self,:count)
+ AddAttribute(self,:count_times)
+ Count_Times = 0
+
+ func Count_Execute
if CommandData()[:aExpr][1] > CommandData()[:aExpr][2] {
nStep = -1
else
@@ -32,11 +43,3 @@ class Count
see nl+x+nl
}
CommandReturn(fabs(CommandData()[:aExpr][1]-CommandData()[:aExpr][2])+1)
- }
- }
- }
-
- func AddAttributes_Count
- AddAttribute(self,:count)
- AddAttribute(self,:count_times)
- Count_Times = 0
