Page 1 of 2

Dynamic and object style structs

Posted: Mon Feb 23, 2004 12:08 am
by techjunkie
I would like something like this,

Code: Select all

Structure <struct_name>
  Var1
  Var2
  AnotherStruct
EndStructure

instance.struct_name = New struct_name

Delete instance
Delete struct_name

Insert
InsertAfter
InsertBefore
FirstStruct
NextStruct
LastStruct
(and more)

For instance.struct_name = Each struct_name
Next

While instance.struct_name
Wend

Repeat
Until instance.struct_name = LastStruct

Posted: Mon Feb 23, 2004 8:21 am
by venom
A linkedlist of <struct_name> using NewList, or use pointers and allocate the memory for the struct.

Posted: Mon Feb 23, 2004 10:33 am
by Kris_a
Ah, that sounds a lot like Blitz. I agree, I think this would be nicer than the current linked list system :)

Edit: I think this code, though...

Code: Select all

Repeat 
Until instance.struct_name = LastStruct 
would need to be changed to 'LastStruct.struct_name', so it knows which one you're talking about...

Posted: Mon Feb 23, 2004 11:33 am
by techjunkie
Kris_a wrote:Ah, that sounds a lot like Blitz. I agree, I think this would be nicer than the current linked list system :)

Edit: I think this code, though...

Code: Select all

Repeat 
Until instance.struct_name = LastStruct 
would need to be changed to 'LastStruct.struct_name', so it knows which one you're talking about...
Yeah - it's "Blitz Style"... :oops:

But it is really usefull... :D

Code: Select all

Until instance.struct_name = LastStruct.struct_name
Well, do you need this? You can pick the struct_name from the left side - couldn't you?

Posted: Mon Feb 23, 2004 11:57 am
by techjunkie
or - why not go all the way...

Code: Select all

Class <class_name>
  Protected var1
  Public var2
  Public struct1
  Procedure1
  Procedure2
EndClass

Posted: Mon Feb 23, 2004 12:44 pm
by Kris_a
techjunkie wrote: Well, do you need this? You can pick the struct_name from the left side - couldn't you?
Well, no, but I'm sure this is easier to program (into PB itself)

Good idea about the protected/public members, too :idea:

Posted: Mon Feb 23, 2004 1:21 pm
by LarsG
OOP, oop-e-oop, oop-e-oop.. :lol:

Posted: Mon Feb 23, 2004 8:42 pm
by techjunkie
LarsG wrote:OOP, oop-e-oop, oop-e-oop.. :lol:
:D Yeah - what can I say...

BlitzMax is scheduled to Mars and it will be all object oriented... I would love to see Pure give it a real fight!

I like Blitz but I like Pure more!

Posted: Mon Feb 23, 2004 8:48 pm
by techjunkie
techjunkie wrote:I like Blitz but I like Pure more!
and yes Fred... You can use this for advertising... :lol:

Posted: Tue Feb 24, 2004 12:16 am
by LarsG
techjunkie wrote:...BlitzMax is scheduled to Mars..
8O whaaaaat?!? where did you get that information :?: .. I haven't read anything about BlitzMax since Marks last worklog post...

Spill the beans.. spill it!!!!!!! :twisted:

ellers så må jeg komme å ta deg!!!! :wink:

Posted: Tue Feb 24, 2004 9:18 am
by techjunkie
LarsG wrote:ellers så må jeg komme å ta deg!!!! :wink:
No, no - don't take me... :roll:

This is way of topic, but... :wink:

What I heard from the Blitz Community and the Blitz Forum... Is the scheduled release date Mars 11 2004. I don't know if it is a rumor or true... I read it in several places...

Posted: Tue Feb 24, 2004 9:29 am
by LarsG
wow.. that's just over two weeks..
*LarsG goes to read up on BB.com and BC.com*

[edit] techjunkie: I couldn't find a sigle post on March 11 and blitzmax.. can you give me some links?? [/edit]

Posted: Tue Feb 24, 2004 10:53 am
by techjunkie
:cry:

Couldn't find the links... but I asked in the forum again... I'll guess we have to wait and see...

Cheers!

Posted: Tue Feb 24, 2004 5:58 pm
by Kris_a
Well, if pure has all these features that have been asked around on the forum (especially this one and the dynamic pointer one), I'm sure it'll give BMax some good competition :D

Posted: Tue Feb 24, 2004 6:26 pm
by techjunkie
Kris_a wrote:Well, if pure has all these features that have been asked around on the forum (especially this one and the dynamic pointer one), I'm sure it'll give BMax some good competition :D
Ohhh YES it would, ohhh yes it would... :!: :!: :!:

:D

Called what? PurePower++? PP++?!?!

Hehe...