Got an idea for enhancing PureBasic? New command(s) you'd like to see?
ts-soft
Always Here
Posts: 5756 Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany
Post
by ts-soft » Fri Sep 30, 2005 2:44 pm
Example:
Code: Select all
Structure Test
First.l
Last.l
Text.s
EndStructure
MyTest.Test
With MyTest
First = 1000
Last = 9999
Text = "Hello PureBasic"
EndWith
Is clear Syntax, i hope
PureBasic 5.73 |
SpiderBasic 2.30 |
Windows 10 Pro (x64) |
Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Dreglor
Enthusiast
Posts: 759 Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA
Post
by Dreglor » Fri Sep 30, 2005 3:12 pm
i see one problem if your using varibles to set the structure that have the same name of the structure field you have problems
~Dreglor
Trond
Always Here
Posts: 7446 Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway
Post
by Trond » Fri Sep 30, 2005 3:25 pm
EDIT: Oh my I'm thick sorry.
Last edited by
Trond on Fri Sep 30, 2005 3:43 pm, edited 1 time in total.
ts-soft
Always Here
Posts: 5756 Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany
Post
by ts-soft » Fri Sep 30, 2005 3:30 pm
Or so:
Code: Select all
MyTest.Test
With MyTest
\First = 1000
\Last = 9999
\Text = "Hello PureBasic"
EndWith
like other programming languages
PureBasic 5.73 |
SpiderBasic 2.30 |
Windows 10 Pro (x64) |
Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri Sep 30, 2005 3:34 pm
Yes, it's planned.
ts-soft
Always Here
Posts: 5756 Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany
Post
by ts-soft » Fri Sep 30, 2005 3:48 pm
thx
PureBasic 5.73 |
SpiderBasic 2.30 |
Windows 10 Pro (x64) |
Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
GedB
Addict
Posts: 1313 Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:
Post
by GedB » Fri Sep 30, 2005 5:01 pm
Excellent.
Will it work with Interfaces, too?
Fred
Administrator
Posts: 18162 Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:
Post
by Fred » Fri Sep 30, 2005 5:49 pm
This will works as a real macro, which means you could put any expression after 'With', and it will be inserted before each orphan '\'.
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri Sep 30, 2005 6:02 pm
BB 2 from Amiga supported this feature.
It used an easy way to do, something like this:
Code: Select all
Structure Test
First.l
Last.l
Text.s
EndStructure
MyTest.Test
Structure Test1
a.l
b.l
EndStructure
NewList li.Test1()
USEPATH MyTest.Test
\First = 1000
\Last = 9999
\Text = "Hello PureBasic"
AddElement li()
USEPATH li()
\a=24
\b=25
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Fri Sep 30, 2005 6:06 pm
Fred wrote: This will works as a real macro, which means you could put any expression after 'With', and it will be inserted before each orphan '\'.
Aha!, just replace the 'USEPATH' word by 'With' word
GedB
Addict
Posts: 1313 Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:
Post
by GedB » Fri Sep 30, 2005 6:47 pm
Hmmmm, Reaaaal Maaaaacrooooooooos!
imagine Homer like drool.