Continuation line for source file

Working on new editor enhancements?
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

It could always be done via option settings:
  • Line continuation character(s)
If left blank, means no line breaks/continuations.
@}--`--,-- A rose by any other name ..
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Please don't add things like this to the editor/IDE because it breaks code
> for everyone who doesn't use it.

Using or not using line continuation characters won't break anything. If the
compiler doesn't see them, then it simply doesn't "compress" the next lines.
You have nothing to fear. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

I'm confused :? If someone writes code using the line continuation characters then how will people using other editors be able to compile it without going through their code and changing all of it?
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

It seems a shame to introduce a feature that will break other editors when the feature could be added in the compiler and retain compatibility across the board. I think even something like notepad should be able to be used to compile PureBasic code (i'm sure you don't expect Microsoft to update that to work with this new feature!) and essentially people will be forced to either use the standard editor or edit code until (and if) the editors they use are updated.

I'm not complaining, just explaining my opinion so whatever is done i'm sure it'll be great! :-)
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Every code must be compileable with the commandline compiler, which
means that such a feature is a compiler thing, not an editor one.

Yes, the PB IDE is the only official one, but we force nobody to use it.
People can use whatever coding environment fits them best, and configure
it to call the commandline compiler (or like jaPBe does, call through PostMessage())
quidquid Latine dictum sit altum videtur
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

Hmm, as far as i know
What is IDE? :P
Integrated Development Environment

In other words, a tool which not only allows programming, but also actually assists it

An IDE should allow, for start:

Edit and complete code, highlight syntax and errors

Run and debug

Show help and documentation

Access external tools and libraries easily

Support maintenance




What to look for in an IDE (1)


Basic features:

One tools supports all (edit, compile, run, debug, deploy, maintain)

Code highlight, completion and hints

Detect errors before the compiler, while editing

On-line help

Full debugging support (breakpoints, steps) for all sorts of programs (apps, web-based, DB-based…)

Files management



What to look for in an IDE (2)


Project management

Handle project directories and files

Smart build, pack and deploy

Version and configuration control

Common goodies

GUI visual editing and coding

DB access

Some support for commonly used files, like XML, web pages, properties, and so on




What to look for in an IDE (3)


Code insight

Mark problems, like exceptions and inconsistencies

Auto-complete methods, parameters, types …

Suggest solutions

Refactoring and maintenance

Rename, move and safe-delete methods and classes

Extract methods, classes and interfaces

Introduce variables, parameters, members…
That is reason everybody don't use Notepad to do their project.
Amiga5k
Enthusiast
Enthusiast
Posts: 329
Joined: Fri Apr 25, 2003 8:57 pm

Post by Amiga5k »

I don't see this as a problem if it is incorporated into the official IDE. On the other hand, a converter could easily be written that would go through someone's source code and convert extended lines to standard lines (of course they would be REALLY wide...)

I think this feature will be added at some point by Fred because it has been requested so many times, maybe version 4?

Russell
*** Diapers and politicians need to be changed...for the same reason! ***
*** Make every vote equal: Abolish the Electoral College ***
*** www.au.org ***
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> If someone writes code using the line continuation characters then how will
> people using other editors be able to compile it

Well, it's the compiler that compiles, not the editor; so anyone using any other
editor will have no problem because the editor they use will just be calling the
PureBasic compiler at compile time. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

PB wrote:Well, it's the compiler that compiles, not the editor; so anyone using any other
editor will have no problem because the editor they use will just be calling the
PureBasic compiler at compile time. :)
That was my point, it would be best as a compiler feature and not an editor feature, for compatibility :)
Mat
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Surely needs to go into both (compiler and official IDE)?

The official editor needs to understand line continuation in order to handle syntax hints, etc.
@}--`--,-- A rose by any other name ..
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

*nods in agreement* The compiler does the 'joining up' of the lines and any editors optionally (definitely one would assume in case of dedicated PB editors!) handle the syntax parsing. That would be great :)
Mat
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> Please don't add things like this to the editor/IDE because it breaks code
> for everyone who doesn't use it. In the compiler for compatibility please!

Huh? All the compiler does is take each line in the editor and parse it.
That doesn't mean it'll break for other editors. The editor is just an editor.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

if it's in the compiler, yes :-)
( 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... )
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

PB wrote:> Please don't add things like this to the editor/IDE because it breaks code
> for everyone who doesn't use it. In the compiler for compatibility please!

Huh? All the compiler does is take each line in the editor and parse it.
That doesn't mean it'll break for other editors. The editor is just an editor.
No, the earlier suggestion that i was replying to was that the editor would take control of the line continuation, e.g. by sending a parsed version to the compiler. So in that regards the editor is no longer 'just an editor' and can directly affect if code written in it will work with different editors that do not have this parsing. If the job of joining the lines is left to the compiler then this cannot happen and code written in one editor will be compatible with other editors.
Mat
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

Amiga5k wrote: ... other hand, a converter could easily be written that would go through ...
codecaddy :-)
( 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... )
Post Reply