NASutils Knowledge BaseUnofficialPolski

BASIC · lesson 6 of 30 · First stepsAsk the user

input reads a number, line input reads a whole line with its spaces.

Programming on the NAS › BASIC in 30 lessons

06-input.yab Download 06-input.yab

line input "Your name: " name$
input "Disks in the NAS: " disks
input "TB in each disk: " tb

print "Hello, ", name$
print "Together the disks have ", disks * tb, " TB"

Terminal

$ yabasic 06-input.yab
Your name: Ann Example
Disks in the NAS: 4
TB in each disk: 8
Hello, Ann Example
Together the disks have 32 TB

Exercise

Ask for the size of a film in GB and say how many fit on 8 TB.