#COMPILE EXE
#DIM ALL
FUNCTION PBMAIN() AS LONG
  LOCAL q AS LNARR
  LOCAL n AS LONG
  q = q.New
  q.Push 10
  q.Push 20
  q.Push 30
  n = q.Count
  IF n <> 3 THEN FUNCTION = 1: EXIT FUNCTION
  n = q.Get 1
  IF n <> 10 THEN FUNCTION = 2: EXIT FUNCTION
  n = q.Get 2
  IF n <> 20 THEN FUNCTION = 3: EXIT FUNCTION
  n = q.Get 3
  IF n <> 30 THEN FUNCTION = 4: EXIT FUNCTION
  q.Set 2, 25
  n = q.Get 2
  IF n <> 25 THEN FUNCTION = 5: EXIT FUNCTION
  q.Ins 2, 15
  n = q.Count
  IF n <> 4 THEN FUNCTION = 6: EXIT FUNCTION
  n = q.Get 1
  IF n <> 10 THEN FUNCTION = 7: EXIT FUNCTION
  n = q.Get 2
  IF n <> 15 THEN FUNCTION = 8: EXIT FUNCTION
  q.Del 3
  n = q.Count
  IF n <> 3 THEN FUNCTION = 9: EXIT FUNCTION
  n = q.Get 1
  IF n <> 10 THEN FUNCTION = 10: EXIT FUNCTION
  n = q.Get 2
  IF n <> 15 THEN FUNCTION = 11: EXIT FUNCTION
  n = q.Get 3
  IF n <> 30 THEN FUNCTION = 12: EXIT FUNCTION
  n = q.Contains 15
  IF n = 0 THEN FUNCTION = 13: EXIT FUNCTION
  n = q.Contains 99
  IF n <> 0 THEN FUNCTION = 14: EXIT FUNCTION
  n = q.IndexOf 15
  IF n <> 2 THEN FUNCTION = 15: EXIT FUNCTION
  q.Swap 1, 3
  n = q.Get 1
  IF n <> 30 THEN FUNCTION = 16: EXIT FUNCTION
  n = q.Get 3
  IF n <> 10 THEN FUNCTION = 17: EXIT FUNCTION
  q.Reverse
  n = q.Get 1
  IF n <> 10 THEN FUNCTION = 18: EXIT FUNCTION
  q.Sort
  n = q.Get 1
  IF n <> 10 THEN FUNCTION = 19: EXIT FUNCTION
  n = q.Count
  IF n <> 3 THEN FUNCTION = 20: EXIT FUNCTION
  q.PushFirst 5
  n = q.Get 1
  IF n <> 5 THEN FUNCTION = 21: EXIT FUNCTION
  n = q.PeekFirst
  IF n <> 5 THEN FUNCTION = 22: EXIT FUNCTION
  n = q.PeekLast
  IF n <> 30 THEN FUNCTION = 23: EXIT FUNCTION
  n = q.PopFirst
  IF n <> 5 THEN FUNCTION = 24: EXIT FUNCTION
  n = q.Count
  IF n <> 3 THEN FUNCTION = 25: EXIT FUNCTION
  n = q.PopLast
  IF n <> 30 THEN FUNCTION = 26: EXIT FUNCTION
  n = q.Count
  IF n <> 2 THEN FUNCTION = 27: EXIT FUNCTION
  q.Clear
  n = q.Count
  IF n <> 0 THEN FUNCTION = 28: EXIT FUNCTION
  q.Final
  FUNCTION = 0
END FUNCTION
