Report Bugs Here

Moderator: Mmiscool

User avatar
By Mmiscool
#53516 For arrays you don't need the "as string". Just add a $ to the the end of the variable name

dim bla$(10) ' Sets up a string array
dim yay() 'Sets up a numeric array.
User avatar
By jlbachiochi
#53562 DOC states...

'Arrays defines without the $ can be defined as string adding ‘as string’ at the end of the line.'

anyway I changed all and still get same error 'undefined array'

Code: Select allmemclear
  dim RatedDatum$(15)
  dim RTDatum$(15)
  dim RTStatus$(15)
  dim StatP$(15)
  dim SettingP1$(15)
  dim SettingP2$(15)
  dim SettingP3$(15)
  dim SwitchP$(15)
  dim DiscreteP$(15)
  gosub [Clear_Stats]
  gosub [Init_Data]

  'wait
  end

[Clear_Stats]
  Stat0 = " "
  Stat1 = " "
  Stat2 = " "
  Stat3 = " "
  Stat4 = " "
  Stat5 = " "
  Stat6 = " "
  Stat7 = " "
  Stat8 = " "
  Stat9 = " "
  Stat10 = " "
  Stat11 = " "
  Stat12 = " "
  Stat13 = " "
  Stat14 = " "
  return
'
[Init_Data]
  gosub [Init_R_D]
  gosub [Init_R_T_D]
  gosub [Init_R_T_S]
  gosub [Init_S_P]
  gosub [Init_S_P_1]
  gosub [Init_S_P_2]
  gosub [Init_S_P_3]
  gosub [Init_Sw_P]
  gosub [Init_D_P]
  return
'
[Init_R_D]
  for i=0 to 7
    RatedDatum$(i) = "?"
  next i
  return
'
[Init_R_T_D]
  for i=0 to 11
    RTDatum$(i) = "?"
  next i
  return
'
[Init_R_T_S]
  for i=0 to 2
    RTStatus$(i) = "?"
  next i
  return
'
[Init_S_P]
  for i=0 to 13
    StatP$(i) = "?"
  next i
  return
'
[Init_S_P_1]
  for i=0 to 14
    SettingP1$(i) = "?"
  next i
  return
'
[Init_S_P_2]
  for i=0 to 12
    SettingP2$(i) = "?"
  next i
  return
'
[Init_S_P_3]
  for i=0 to 13
    SettingP3$(i) = "?"
  next i
  return
'
[Init_Sw_P]
  for i=0 to 7
    SwitchP$(i) = "?"
  next i
  return
'
[Inite_D_P]
  for i=0 to 1
    DiscreteP$(i) = "?"
  next i
  return
'
User avatar
By Mmiscool
#53647 You have identified a bug. Using upper case letters in the name of an array will cause problems. This is a bug i intend to resolve but for right now just make your array names all lower case.
User avatar
By jlbachiochi
#53668 Will do.

Assuming there is some kind of garbage collection, are there any error messages if storage space runs out? Suspecting some problems that seem to lock up execution when variables are continually updated.

thanks