Sorting algorithms/Bubble sort: Difference between revisions

m
Line 2,319:
 
=={{header|M2000 Interpreter}}==
'''A=(1,2,3,4)''' is a pointer to an auto array. We can read one item '''Array(A,0)=1''', or we can add 1 to all items '''A++''', or add 5 to all items '''A+=5'''. We can link to standard interface, '''Link A to A()''' so now '''A(1)++''' increment 2nd item by one. '''Print A''''''Bold text''' print all items, one per column
 
'''A=Stack:=1,2,3,4''' is a pointer to a stack object. We can read any item using '''StackItem()''', from 1 (we can omit number 1 for first item, the top). Stack items can be move very fast, it is a linked list. To apply stack statements we have to make A as current stack (preserving current stack) using Stack A { }, so we can drop 2 items (1 and 2) using '''Stack A {Drop 2}''''''Bold text'''. '''Print A''' print all items, one per column
 
 
Anonymous user