B4J Question [SOLVED] How to solve String not closed $

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
compiler doesnt like you using reserverd words.

try:
B4X:
    Dim sbAll As String
sbAll = $" Sub HiddenLGAndUp
    AddClass("hidden-lg-and-up")
"End Sub"

"Sub HiddenSMAndDown"
    AddClass("hidden-sm-and-down")
    End Sub"$

or use varibles for such cases
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
then as i said, use variables.
B4X:
    Dim su As String = "Sub"
    Dim esu As String = "End Sub"
    
    Dim sbAll As String
    sbAll = $" ${su} HiddenLGAndUp
    AddClass("hidden-lg-and-up")
${esu}

${su} HiddenSMAndDown
    AddClass("hidden-sm-and-down")
    End Sub"$
 
Upvote 0
Top