Double-quotes in strings

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Double-quotes in strings

Post by Kiffi »

How about writing a Preprocessor which replaces double-quotes or
escape-sequences or whatever you want in the source code to
standard PB string concatenation?

This Preprocessor can start as a PB-Tool (Trigger: Before run/compile).

Just a suggestion ... Kiffi
Hygge
BorisTheOld
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Apr 24, 2012 5:08 pm
Location: Ontario, Canada

Re: Double-quotes in strings

Post by BorisTheOld »

RichAlgeni wrote:
BorisTheOld wrote:the last thing we need is for PB to be substituting "random" characters in quoted strings. That would not make me happy a happy programmer.
Boris is apparently a 'glass is half empty' kind of guy. Obviously this wouldn't be a 'random' character, it would need to be defined in someway, so that the compiler knew what it was.
Yes, some (most) of my friends regard my glass as being half empty. :) , but I think I have a valid concern.

I don't want PB to be replacing my own special character sequences with what are to me "random characters", just because PB thinks they are PB escape codes.

Fundamental changes like this should be carefully thought out before implementing them.

Compiler override flags, I think, will be needed for many new features, just to prevent existing code from being broken.
For ten years Caesar ruled with an iron hand, then with a wooden foot, and finally with a piece of string.
~ Spike Milligan
MachineCode
Addict
Addict
Posts: 1482
Joined: Tue Feb 22, 2011 1:16 pm

Re: Double-quotes in strings

Post by MachineCode »

Kiffi wrote:How about writing a Preprocessor
But then you can't share your code on the forums.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
User avatar
Kiffi
Addict
Addict
Posts: 1485
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Double-quotes in strings

Post by Kiffi »

MachineCode wrote:But then you can't share your code on the forums.
you can share the preprocessor-output.

Greetings ... Kiffi
Hygge
Post Reply