Multidimensional Array in Liberty Basic -


I am programming to learn a newbie and the book I am using is using Liberty Basic The book gives an example of the code given below for two-dimensional array.

  i = 1 to 2 j = 1 to 3 for slow hunting $ (2, 3) "do you want to hurt?"; Enemy $ hunting $ (i, j) = enemy $ next next next signal me "you want to extract array type of item x space, such as 1:"; X prompt "type y location array array item that you want to print, such as 1:"; Y print victim $ (X, Y) + "is most hurtable."  

But when I run this example using Liberty Basic v4.04, I get a syntax error on this line of code:

  Duck hunting $ (2, 3)  

Any help would be greatly appreciated.

I got it

Answer:

From 1 = 2 to j = 1 to 3 for slow hunting $ (2, 3) "Who do you want to hurt?" ; Enemy $ hunting $ (i, j) = enemy $ next next next signal me "you want to extract array type of item x space, such as 1:"; X prompt "type y location array array item that you want to print, such as 1:"; Y print victim $ (X, Y) + "is most hurtable."

Once I remove extra blank rows, the code works.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -