轉換大寫和小寫
如前所述,字串通常不區分大小寫,但僅考慮字串的比較。內建函式可以更換外殼。
CAPS(字串)
使字串大寫
LC(字串)
使字串小寫
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "Hello".
d = "World".
DISPLAY CAPS(c) LC(d). // HELLO world
記住字串通常不區分大小寫
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "hello".
d = "hello".
DISPLAY CAPS(c) = LC(d). // yes
除非特定為 CASE-SENSITIVE
DEFINE VARIABLE c AS CHARACTER NO-UNDO CASE-SENSITIVE.
DEFINE VARIABLE d AS CHARACTER NO-UNDO.
c = "hello".
d = "hello".
DISPLAY CAPS(c) = LC(d). // no