Inside DataSection

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Inside DataSection

Post by Psychophanta »

Ability to do:

Code: Select all

DataSection
Data.l
Blue:$efa284,$8c4131,$ffc3a5
GreenBlue:$bdcf00,$7b7d00,$e7f700
Green:$a0ee00,$307a00,$c0fe00
Data.b
Red:$00,$40,$45
Violet:$bd,$84,$e7
EndDataSection
instead to have to

Code: Select all

DataSection
Blue:Data.l $efa284,$8c4131,$ffc3a5
GreenBlue:Data.l $bdcf00,$7b7d00,$e7f700
Green:Data.l $a0ee00,$307a00,$c0fe00
Red:Data.b $00,$40,$45
Violet:Data.b $bd,$84,$e7
EndDataSection
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Inside DataSection

Post by traumatic »

Maybe I don't fully understand your request, but what about mixed datatypes then?
Good programmers don't comment their code. It was hard to write, should be hard to read.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: Inside DataSection

Post by Psychophanta »

traumatic wrote:Maybe I don't fully understand your request, but what about mixed datatypes then?
Nice, but how to write it? can you write an example of how it could be?
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@psychophanta:
sorry, i dont understand your point :roll:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

I mean that Data command is needed now to be writen one per line.
And i request to be able to write once only. Until data stuff ends or until a new type must be written.
If this would be, then DataSection and EndDatasection commands would be a surplus.
For example, there should be:

Code: Select all

Data.l;   <- Data section beginning
; line with long values....
; another line with long values
; another one
; ...
Data.s
; line with string values....
; another line with string values
; another one
; ...
;etc...
EndData;   <- Data section end
Each Data.<type> would be like DataSection command, but besides of that, it defines a type for the next bytes stuff.
Last edited by Psychophanta on Mon Nov 14, 2005 7:34 pm, edited 1 time in total.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

ahhhh :lol: ok, i think i got the point...

you can save your datas as binary and include to the datasection, so you dont have to write data.x each line... but its not so easy when you want to change any value in the *.bin inlcuded file...
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

For included files or binaries would be:

Code: Select all

Data.b
  MapLabel:
  IncludeBinary "Data\map.data"
EndData
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Re: Inside DataSection

Post by traumatic »

Psychophanta wrote:
traumatic wrote:Maybe I don't fully understand your request, but what about mixed datatypes then?
Nice, but how to write it? can you write an example of how it could be?
That's what I mean, I see no way doing this using your approach. ;)
Good programmers don't comment their code. It was hard to write, should be hard to read.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

Psychophanta wrote:For included files or binaries would be:

Code: Select all

Data.b
  MapLabel:
  IncludeBinary "Data\map.data"
EndData
@psychophanta:
thats the way i tried to explain ;)
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Post Reply