BriskVM Question

Just starting out? Need help? Post your questions and find answers here.
matty47
User
User
Posts: 35
Joined: Fri Sep 26, 2003 10:21 pm

BriskVM Question

Post 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
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: BriskVM Question

Post 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
Windows 11, Manjaro, Raspberry Pi OS
Image
matty47
User
User
Posts: 35
Joined: Fri Sep 26, 2003 10:21 pm

Re: BriskVM Question

Post 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
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: BriskVM Question

Post 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) 

Windows 11, Manjaro, Raspberry Pi OS
Image
matty47
User
User
Posts: 35
Joined: Fri Sep 26, 2003 10:21 pm

Re: BriskVM Question

Post 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
User avatar
idle
Always Here
Always Here
Posts: 5915
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: BriskVM Question

Post 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
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply