NewList or List in a Structure how to declare and using ?

Just starting out? Need help? Post your questions and find answers here.
hdt888
User
User
Posts: 57
Joined: Sun Jul 07, 2024 8:42 am

NewList or List in a Structure how to declare and using ?

Post by hdt888 »

Hi, I am new to PB.

How to declare New List, List in a struct.

It is better to have an example of how to use Procedure inside and outside.

Thank man.
PB 5.x + 6.x + Win10. Feel the ...Pure... Power.
infratec
Always Here
Always Here
Posts: 7662
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: NewList or List in a Structure how to declare and using ?

Post by infratec »

Code: Select all

structure ListExample_Structure
  List ListExample.i()
endstructure
That's all.
NewList is not involved.
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: NewList or List in a Structure how to declare and using ?

Post by mk-soft »

And ...

Code: Select all

Structure ListExample_Structure
  List ListExample.i()
EndStructure

; Then ...

Global ListData.ListExample_Structure

; Or ...

*mem1 = AllocateStructure(ListExample_Structure)
; ...
FreeStructure(*mem1)

; Or ...

*mem2 = AllocateMemory(SizeOf(ListExample_Structure))
InitializeStructure(*mem2, ListExample_Structure)
; ...
ClearStructure(*mem2, ListExample_Structure)
FreeMemory(*mem2)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply