尝试在 purebasic 版本 5.70 LTS 上激活 30 天试用版,但使用发布的代码在检查语法时返回以下错误。 (如果有什么区别的话,在 64 位 w7 机器上使用 32 位版本)
我正在使用:
Dim glob 作为新的 Chilkat.Global glob.UnlockBundle("开始我的 30 天 试用”)
并得到以下错误:
第 4 行“Dim”系统是:Dim Name(nb)。
Dim 用于定义数组。要定义一个包含 3 个字符串的数组,您可以这样写
Dim names.s(2)
根据Chilkat网站的PureBasic模块,要解锁捆绑包,您应该按照以下示例操作。
IncludeFile "CkGlobal.pb"
Procedure ChilkatExample()
; The Chilkat API can be unlocked for a fully-functional 30-day trial by passing any
; string to the UnlockBundle method. A program can unlock once at the start. Once unlocked,
; all subsequently instantiated objects are created in the unlocked state.
;
; After licensing Chilkat, replace the "Anything for 30-day trial" with the purchased unlock code.
; To verify the purchased unlock code was recognized, examine the contents of the LastErrorText
; property after unlocking. For example:
glob.i = CkGlobal::ckCreate()
If glob.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
success.i = CkGlobal::ckUnlockBundle(glob,"Anything for 30-day trial")
If success <> 1
Debug CkGlobal::ckLastErrorText(glob)
CkGlobal::ckDispose(glob)
ProcedureReturn
EndIf
status.i = CkGlobal::ckUnlockStatus(glob)
If status = 2
Debug "Unlocked using purchased unlock code."
Else
Debug "Unlocked in trial mode."
EndIf
; The LastErrorText can be examined in the success case to see if it was unlocked in
; trial more, or with a purchased unlock code.
Debug CkGlobal::ckLastErrorText(glob)
CkGlobal::ckDispose(glob)
ProcedureReturn
EndProcedure