在 Star Basic Macros 中,在 Libre Calc 中,我无法创建要作为表达式传递的字符串
In Starbasic Macros, in LibreCalc, I cant make a string to be passed as expression
在 Starbasic Macros 中,在 LibreCalc 中,我无法创建要作为表达式传递的字符串。
- splitColours(1) returns 字符串的名称
- cLightYellow returns变量的值
如何将字符串转换为表达式?
cLightYellow = RGB(24,194,205)
cLightPurple = RGB(224,194,205)
cLightGreen = RGB(175,208,149)
cBlue = RGB(114,159,207)
cOrange = RGB(232,162,2)
cGreen = RGB(63,175,70)
cBlack = RGB(49,64,4 )
Const oColours = "cLightYellow|cLightPurple|cLightGreen|" _
& "cBlue|cOrange|cGreen|cBlack"
splitColours = Split(oColours, "|")
' print splitColours(1) returns the name of string
' print cLightYellow returns the value of the variable
In Libreoffice forum, it was suggested that I can put them in Array:
cLightBlue = RGB(180,199,220)
cLightPurple = RGB(224,194,205)
cLightGreen = RGB(175,208,149)
cBlue = RGB(114,159,207)
cOrange = RGB(232,162,2)
cGreen = RGB(63,175,70)
cBlack = RGB(49,64,4 )
genColors = array( cLightYellow , cLightPurple, cLightGreen, _
cBlue, cOrange, cGreen, cBlack)
for ii = 0 to 6 step 1
print genColors(ii)
next ii
在 Starbasic Macros 中,在 LibreCalc 中,我无法创建要作为表达式传递的字符串。
- splitColours(1) returns 字符串的名称
- cLightYellow returns变量的值
如何将字符串转换为表达式?
cLightYellow = RGB(24,194,205)
cLightPurple = RGB(224,194,205)
cLightGreen = RGB(175,208,149)
cBlue = RGB(114,159,207)
cOrange = RGB(232,162,2)
cGreen = RGB(63,175,70)
cBlack = RGB(49,64,4 )
Const oColours = "cLightYellow|cLightPurple|cLightGreen|" _
& "cBlue|cOrange|cGreen|cBlack"
splitColours = Split(oColours, "|")
' print splitColours(1) returns the name of string
' print cLightYellow returns the value of the variable
In Libreoffice forum, it was suggested that I can put them in Array:
cLightBlue = RGB(180,199,220)
cLightPurple = RGB(224,194,205)
cLightGreen = RGB(175,208,149)
cBlue = RGB(114,159,207)
cOrange = RGB(232,162,2)
cGreen = RGB(63,175,70)
cBlack = RGB(49,64,4 )
genColors = array( cLightYellow , cLightPurple, cLightGreen, _
cBlue, cOrange, cGreen, cBlack)
for ii = 0 to 6 step 1
print genColors(ii)
next ii