' カーソル位置の文字のコード番号を表示 ' proc Code dim r, m$, s$, t$ if @hwnd=0 then end if @Code=-223 then s$="EOF" elseif @Code=-224 then s$="RETURN" elseif @Code=9 then s$="TAB" elseif @Code=32 then s$="SPACE" else s$=chr$(@Code) end if m$=cformat$("%-18s[%s]", "表示文字:", s$) m$=cformat$("%s%s%-18s%d", m$, chr$(13), "コード(10進数):", @Code) m$=cformat$("%s%s%-18s0x%X", m$, chr$(13), "コード(16進数):", @Code) s$=cformat$("表示文字:[%s] コード(10進数):[%d] コード(10進数):[0x%X]", s$, @Code, @Code) t$ = "カーソル位置の文字コード" print s$ call msgbox(m$,0,t$) end proc