RSet Statement

๋ฌธ์ž์—ด์„ ๋ฌธ์ž์—ด ๋ณ€์ˆ˜ ๋‚ด์—์„œ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋งž์ถ”๊ฑฐ๋‚˜ ์‚ฌ์šฉ์ž ์ •์˜ ๋ณ€์ˆ˜ ์œ ํ˜•์„ ๋‹ค๋ฅธ ์œ ํ˜•์— ๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๊ตฌ๋ฌธ:


RSet Text As String = Text ๋˜๋Š” RSet Variable1 = Variable2

๋งค๊ฐœ ๋ณ€์ˆ˜:

Text: ์ž„์˜์˜ ๋ฌธ์ž์—ด ๋ณ€์ˆ˜์ž…๋‹ˆ๋‹ค.

Text: ๋ฌธ์ž์—ด ๋ณ€์ˆ˜์—์„œ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋งž์ถœ ๋ฌธ์ž์—ด์ž…๋‹ˆ๋‹ค.

Variable1: ๋ณต์‚ฌํ•œ ๋ณ€์ˆ˜์˜ ๋Œ€์ƒ์ด ๋˜๋Š” ์‚ฌ์šฉ์ž ์ •์˜ ๋ณ€์ˆ˜์ž…๋‹ˆ๋‹ค.

Variable2: ๋‹ค๋ฅธ ๋ณ€์ˆ˜์— ๋ณต์‚ฌํ•  ์‚ฌ์šฉ์ž ์ •์˜ ๋ณ€์ˆ˜์ž…๋‹ˆ๋‹ค.

๋ฌธ์ž์—ด์ด ๋ฌธ์ž์—ด ๋ณ€์ˆ˜๋ณด๋‹ค ์งง์„ ๊ฒฝ์šฐ RSet์€ ๋ฌธ์ž์—ด ๋ณ€์ˆ˜ ๋‚ด์—์„œ ๋ฌธ์ž์—ด์„ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋งž์ถฅ๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด ๋ณ€์ˆ˜์˜ ๋‚˜๋จธ์ง€ ๋ฌธ์ž๋Š” ๋ชจ๋‘ ๊ณต๋ฐฑ์œผ๋กœ ๋ฐ”๋€๋‹ˆ๋‹ค. ๋ฌธ์ž์—ด์ด ๋ฌธ์ž์—ด ๋ณ€์ˆ˜๋ณด๋‹ค ๊ธธ ๊ฒฝ์šฐ ๋ณ€์ˆ˜ ๊ธธ์ด๋ฅผ ์ดˆ๊ณผํ•˜๋Š” ๋ฌธ์ž๋Š” ์ž˜๋ฆฌ๊ณ  ๋‚˜๋จธ์ง€ ๋ฌธ์ž๋งŒ ๋ฌธ์ž์—ด ๋ณ€์ˆ˜ ๋‚ด์—์„œ ์˜ค๋ฅธ์ชฝ์œผ๋กœ ๋งž์ถฐ์ง‘๋‹ˆ๋‹ค.

RSet ๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ์‚ฌ์šฉ์ž ์ •์˜ ์œ ํ˜•์˜ ๋ณ€์ˆ˜๋ฅผ ๋™์ผํ•œ ์œ ํ˜•์˜ ๋‹ค๋ฅธ ๋ณ€์ˆ˜์— ํ• ๋‹นํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ์€ RSet ๋ฐ LSet ๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ฌธ์ž์—ด์˜ ์™ผ์ชฝ ๋ฐ ์˜ค๋ฅธ์ชฝ ๋งž์ถค์„ ์ˆ˜์ •ํ•˜๋Š” ์˜ˆ์ž…๋‹ˆ๋‹ค.

์˜ˆ:


Sub ExampleRLSet
Dim sVar As String
Dim sExpr As String
    sVar = String(40,"*")
    sExpr = "SBX"
    REM Right-align "SBX" in a 40-character string
    REM Replace asterisks with spaces
    RSet sVar = sExpr
    Print ">"; sVar; "<"
    sVar = String(5,"*")
    sExpr = "123457896"
    RSet sVar = sExpr
    Print ">"; sVar; "<"
    sVar = String(40,"*")
    sExpr = "SBX"
    REM Left-align "SBX" in a 40-character string
    LSet sVar = sExpr
    Print ">"; sVar; "<"
    sVar = String(5,"*")
    sExpr = "123456789"
    LSet sVar = sExpr
    Print ">"; sVar; "<"
End Sub

Please support us!