string.tpl
来自「在手机操作系统symbina上使用的一个脚本扩展语言的代码实现,可以参考用于自己」· TPL 代码 · 共 46 行
TPL
46 行
INCLUDE "sstore.oxh"
PROC main:
LOCAL storeId%, streamId&, error%, uId&, string$(255)
string$ = "Test string"
uId& = 1234
storeId% = SsCreateStore%:("mystore", KStoreDirectFile% OR KStoreUseDictionary%, KDirectFileStoreLayoutUid&, 0, 0, 0)
print "SsCreateStore", storeId%
streamId& = SsCreateStream&:(storeId%)
print "SsCreateStream", streamId&
error% = SsAssocUId%:(storeId%, streamId&, uId&)
print "SsAssocUId", error%
error% = SsWriteString%:(storeId%, streamId&, string$, 11)
print "SsWriteString", error%
error% = SsCloseStream%:(storeId%, streamId&)
print "SsCloseStream", error%
error% = SsCloseStore%:(storeId%)
print "SsCloseStore", error%
storeId% = SsOpenStore%:("mystore", KStoreDirectFile% OR KStoreUseDictionary%, KDirectFileStoreLayoutUid&, 0, 0)
print "SsOpenStore", storeId%
streamId& = SsGetStreamId&:(storeId%, uId&)
print "SsGetStreamId", streamId&
error% = SsOpenStream%:(storeId%, streamId&, KStreamTypeRead%)
print "SsOpenStream", error%
string$ = SsReadString$:(storeId%, streamId&, 11)
print "SsReadString", string$
rem error% = SsCloseStream%:(storeId%, streamId&)
rem print "SsCloseStream", error%
rem error% = SsCloseStore%:(storeId%)
rem print "SsCloseStore", error%
get
ENDP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?