Page 1 of 1
BriskVM Question
Posted: Sat Sep 03, 2011 10:36 pm
by matty47
Hi,
just getting back to Purebasic and after reading a recent thread re scripting, I tried BriskVM (purchased the licence several years ago), however compilation fails on the following line
[code] Global **BVM_CurrentProcess.BVM_TProcess [/code]
I could not find an explanation of what the ** means. Single * is a pointer? but what does the double ** do?
Any help appreciation.
Thanks Matthew
Re: BriskVM Question
Posted: Sun Sep 04, 2011 12:42 am
by idle
it's a pointer to a pointer which is quite commonly used in c
it may help to post the relevant bit of the c header
Re: BriskVM Question
Posted: Sun Sep 04, 2011 1:03 am
by matty47
Thanks for the reply. The code is in a purebasic include file.
[code]Global BVM_MAIN_CMD_SET_DEF_.s = BVM_InitStringConst_BVM_MAIN_CMD_SET_DEF_()
Global BVM_gMainCmdSet_.l = 0
Global BVM_gInteractiveSessionCounter.l = 0
Global BVM_TempModuleCounter.l = 0
Global **BVM_CurrentProcess.BVM_TProcess
Global **BVM_FirstMutex.BVM_TMutex
[/code]
with the BVM_TProcess declaration further down the file
[code]Global NewList BVM_ObjectList_BVM_TProcess.BVM_TProcess()
Procedure.l BVM_Instanciate_BVM_TProcess_()
AddElement(BVM_ObjectList_BVM_TProcess())
ProcedureReturn @BVM_ObjectList_BVM_TProcess()
EndProcedure
Structure BVM_TProcessGroup
**firstProcess.BVM_TProcess
**lastProcess.BVM_TProcess
**currentProcess.BVM_TProcess
EndStructure
Global NewList BVM_ObjectList_BVM_TProcessGroup.BVM_TProcessGroup()
Procedure.l BVM_Instanciate_BVM_TProcessGroup_()
AddElement(BVM_ObjectList_BVM_TProcessGroup())
ProcedureReturn @BVM_ObjectList_BVM_TProcessGroup()
EndProcedure[/code]
does this help?
Does purebasic itself support pointer to pointer? I could not see any mention of it in the help files.
thanks
Matthew
Re: BriskVM Question
Posted: Sun Sep 04, 2011 1:14 am
by idle
no pb does not support **
Where did the PB include come from?
just do it as
Code: Select all
Global *BVM_CurrentProcess.BVM_TProcess
Global *BVM_FirstMutex.BVM_TMutex
and if you need to pass them into a function , this might work
BVM_CREATE_MUTEX_(@*BVM_FirstMutex\BVM_TMutex)
Re: BriskVM Question
Posted: Sun Sep 04, 2011 1:22 am
by matty47
The include file came with the purebasic code demos included in the BriskVM download. I have the full package but I assume it's probably in the demo version as well. Thing is it's supposed to be cross platform and I would like a scripting engine for purebasic that I can use on linux/windows/mac. I'll try posting on the BriskVM forum although it is very quiet over there.
thanks for the speedy responses
Re: BriskVM Question
Posted: Sun Sep 04, 2011 1:33 am
by idle
unfortunately they only have a windows demo version
If what I posted doesn't work, I would really need to see the c header to figure out how to convert it