Found an issue in SpiderBasic ? Please report it here !
munfraid
 
Posts: 29
Joined: Sat Mar 24, 2018 1:33 pm

2.21: SwapElements() not working

by munfraid Sat Jun 22, 2019 4:57 pm

Running the official example code just gives a debug output "undefined"
Code: Select all
  NewList Numbers()
 
  For k=0 To 10
    AddElement(Numbers())
    Numbers() = k
  Next
   
  SelectElement(Numbers(), 3) ; Get the 4th element (first element is 0)
  *FirstElement = @Numbers()
 
  SelectElement(Numbers(), 9) ; Get the 10th element
  *SecondElement = @Numbers()
 
  ; Swap the 3 with the 9
  ;
  SwapElements(Numbers(), *FirstElement, *SecondElement)
   
  ; Prove it
  ;
  ForEach Numbers()
    Debug Numbers()
  Next


SB 2.21 on Ubuntu Linux Mate 18.04 LTS
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 3 guests