You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tload "/etc/passwd", buffer
dim users
for row in buffer
split row, ":", fields()
if (len(fields) > 0) then
local user
user.name = fields(0)
user.passwd = fields(1)
user.userId = fields(2)
user.groupId = fields(3)
' Line below seems linked to error
users(user.name) = user
fi
next row
? users("mail").userId
RTE-ERROR ... Line 11
Expr/RT: Not a number
The text was updated successfully, but these errors were encountered:
I just realized, when doing 2 changes, the example works. But still DIM doesn't do, what it should.
tload"/etc/passwd",bufferusers=array("{}")forrowinbuffersplitrow,":",fields()if(ubound(fields)>0)thenlocaluseruser.name=fields(0)user.passwd=fields(1)user.userId=fields(2)user.groupId=fields(3)' Line below seems linked to errorusers(user.name)=userfinextrow?users("mail").userId
I was just learning about associative arrays in SmallBASIC and unfortunately there seems to be an issue with the exmaple:
https://smallbasic.github.io/pages/features.html
The text was updated successfully, but these errors were encountered: