Using arrays as INPUT variables

This forum is dedicated to those who want support programming in ugBASIC.
Questo forum è dedicato a chi desidera supporto per programmare in ugBASIC.
Ce forum est dédié à ceux qui souhaitent prendre en charge la programmation en ugBASIC.
Post Reply
jjarrell
Posts: 26
Joined: Tue Jan 28, 2025 5:35 pm

Using arrays as INPUT variables

Post by jjarrell »

Can you use arrays as an input variable?

The first code generates this error when compiling.

Error: INPUT unsupported for variable of given datatype (name, ARRAY)

Code: Select all

DIM name$(10)	
INPUT "What name will you go by? ",name$(1)
PRINT name$(1)
WAIT KEY RELEASE
This code compiles but just takes an extra step.

Code: Select all

DIM name$(10)
INPUT "What name will you go by? ",plyName$
name$(1)=plyName$
PRINT name$(1)
WAIT KEY RELEASE
Post Reply