Multilined statements for PB IDE ...

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Multilined statements for PB IDE ...

Post by Didelphodon »

Hi!

If anyone feels the need to have some support for multilined statements - or in other words, long and complex statements, that can be splitted over multiple lines - this might be a solution for you.

I made a PB IDE plugin that makes this possible.
The idea/concept: The character ":" is already used to connect multiple statements to one line. I thought that the same character could also work as the opposite. If you have a ":" at the end of a line without any trailing code (with exception of comments) this stands for "continue the actual line in the following".

Example:

Code: Select all

a.l = 1 : ; Some comment
    + 2 : 
    + 3   ; The end of a 3line statement
So, as you can see, the last line of such a multiline-statement doesn't have a ":".

Features of my plugin:
* Multiline commands
* Preprocessing during the events load, save, compile, and create executable (edit)
* The saved file is always runnable even without my plugin
* Backup files are created as prevention against dataloss as implication of bugs
* Debugger works without any drawbacks (breakpoints, and even hovering of variables)

Interested? Download it from my website: http://www.wojner.at/static/downloads/purewrap.exe
But please note that it's still in a proof of concept state, so don't use it on important code firstly. ;-)

The plugin is splitted into 3 tool-definitions as follows: (Edit: 4 tool-definitions)

Tool1:
Image

Tool2:
Image

Tool3:
Image

Edit: Tool4:
Image

Edit: You can also change the action-character to any you like by editing the file purewrap.pref which is initially created in your home-folder.

I hope it works for you as stable as for me ... have phun with it!

Cheers,
Didelphodon.
Last edited by Didelphodon on Wed Feb 25, 2015 11:22 am, edited 3 times in total.
Go, tell it on the mountains.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Multilined statements for PB IDE ...

Post by ts-soft »

nice one, but with bug :wink:

write some code in a empty tab and save the source, endless loop! Only Taskmanager helped me.

greetings
Thomas
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Multilined statements for PB IDE ...

Post by Didelphodon »

What do you mean by "empty tab"? Please gimme more details that i can correct this issue.
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Multilined statements for PB IDE ...

Post by Didelphodon »

Ok, I found out that you meant an empty sourcefile! ;-)
I solved that problem - the new version is online.

Cheers,
Didel.
Go, tell it on the mountains.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Multilined statements for PB IDE ...

Post by ts-soft »

Imageworks fine, thx
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: Multilined statements for PB IDE ...

Post by blueznl »

Welcome to the multiline supporters group, we'll have our weekly meetings at Wednesdays every second week of the month. Make sure you bring your 'how I survived PureBasic without multiline suport' handbook with you!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Re: Multilined statements for PB IDE ...

Post by Rings »

blueznl wrote:Welcome to the multiline supporters group, we'll have our weekly meetings at Wednesdays every second week of the month. Make sure you bring your 'how I survived PureBasic without multiline suport' handbook with you!
my daily comedian talk.
thx a lot ;)
SPAMINATOR NR.1
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: Multilined statements for PB IDE ...

Post by ts-soft »

Next Bug: doesn't work with labels!

edit:

Code: Select all

DataSection
  msg:
  Data.s "I am a Bug!"
EndDataSection

Debug PeekS(?msg)
Last edited by ts-soft on Wed Apr 21, 2010 3:30 pm, edited 1 time in total.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: Multilined statements for PB IDE ...

Post by Little John »

blueznl wrote:Welcome to the multiline supporters group, we'll have our weekly meetings at Wednesdays every second week of the month. Make sure you bring your 'how I survived PureBasic without multiline suport' handbook with you!
:wink:
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: Multilined statements for PB IDE ...

Post by Kaeru Gaman »

I thought it was "Multiliners Anonymous"? Image
oh... and have a nice day.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Multilined statements for PB IDE ...

Post by Didelphodon »

ts-soft wrote:Next Bug: doesn't work with labels!

edit:

Code: Select all

DataSection
  msg:
  Data.s "I am a Bug!"
EndDataSection

Debug PeekS(?msg)
It does work *now*.

Thx for reporting!
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Multilined statements for PB IDE ...

Post by Didelphodon »

blueznl wrote:... we'll have our weekly meetings at Wednesdays every second week of the month ...
So it's not weekly at all! That's weak(ly) :mrgreen:
Go, tell it on the mountains.
Post Reply