Report Bugs Here

Moderator: Mmiscool

User avatar
By jlbachiochi
#53312 using V3a41

Is there a label length limit?
...
[Initialize_Setting_Parameters_1]
[Initialize_Setting_Parameters_2]
[Initialize_Setting_Parameters_2]
...
Label already defined [Initialize_Setting_Parameters_2]
Label already defined [Initialize_Setting_Parameters_3]

I'm seeing only about 50 of my variables are being recognized. Is there a limit?
User avatar
By Oldbod
#53348 I don't know the answer but many languages will not discriminate between variables of as you suspect over a certain length. Been meaning to ask what the limits are for size of the different data types, just in case i hit it.

Would also be good to know how variables are actually stored. (Ram / flash / rtc ram or whatever ) as well as storage layout. I suppose i should read the source, always good to learn another language...
User avatar
By Mmiscool
#53462 There are 2 things here.


I think that the character limit for the length of a [label] is 10 characters.

Variable names lengths should also be limited to 10 characters.

There is a maximum of 50 variables that can be used by your basic program. This is not counting arrays but arrays can be used by the web gui for textboxs and what not.
User avatar
By jlbachiochi
#53509 OK, so I limited labels to 10 characters (although I suspect the max is more like 16 or 20) .

As far as the variables go, I changed most to use arrays. Debugger is complaining that arrays are 'not defined'

I've reduced to code demonstrate...

Code: Select allmemclear
  dim RatedDatum(15) as string
  dim RTDatum(15) as string
  dim RTStatus(15) as string
  dim StatP(15) as string
  dim SettingP1(15) as string
  dim SettingP2(15) as string
  dim SettingP3(15) as string
  dim SwitchP(15) as string
  dim DiscreteP(15) as string
  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
'