Page 1 of 1

Multilined statements for PB IDE ...

Posted: Tue Apr 20, 2010 9:14 pm
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.

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:21 am
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

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 7:52 am
by Didelphodon
What do you mean by "empty tab"? Please gimme more details that i can correct this issue.

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 12:16 pm
by Didelphodon
Ok, I found out that you meant an empty sourcefile! ;-)
I solved that problem - the new version is online.

Cheers,
Didel.

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 2:28 pm
by ts-soft
Imageworks fine, thx

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:10 pm
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!

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:17 pm
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 ;)

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:26 pm
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)

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:29 pm
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:

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 3:37 pm
by Kaeru Gaman
I thought it was "Multiliners Anonymous"? Image

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 4:00 pm
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!

Re: Multilined statements for PB IDE ...

Posted: Wed Apr 21, 2010 4:04 pm
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: