Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread J. Gareth Moreton
I'm a bit late to the party again, but the example of an OpenGL shader has won me over, since game design is one thing I enjoy doing.  I guess I'm still a bit unsure how leading and trailing whitespace should be handled, but as long as it's well-documented, I think I'll be happy! Speaking of

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread J. Gareth Moreton
On an extra note, the assembly language produced is not yet optimal, so it may end up that an x86-specific implementation will be beneficial.  TIsNode contains a virtual method named "DoVariableEnumCheck" that would allow such an extension, coupled with returning "nil" that would defer code

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread J. Gareth Moreton
Uploaded the latest patch (AS-IS-enum-07.patch) over here and also a test project that evaluates the "is" operator between different ordinal types. Following the advice of Jonas and Florian, I've removed my x86-specific code for now. Gareth

[fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread Ben Grasset
Neat bit of trivia: Multi line strings even work properly with Ryan's (Ryan Joseph that is) very-cool-but-not-yet-merged-to-trunk generic constants patch. With a build of FPC that includes both, you can do some really interesting stuff: program

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread J. Gareth Moreton
Oh right!  In that case, I can upload the code now... well, after I finish testing everything!  (I'll keep my platform-specific code in a personal branch though in case it doesn't work). I have seen once source of inefficiency in the compiled assembly language and that's something akin to

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread Jonas Maebe
On 07/07/2019 07:33, J. Gareth Moreton wrote: > Maybe I'm missing something painfully > obvious here. Can I request an example > where such an invalid value/undefined > behaviour crops up in bitpacked records so > I can see what's going on? Logic dictates > that the number of bits required to

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread J. Gareth Moreton
Most of it is node-level.  Ondrej's method was to use an inlined compilerproc to do the range check, but the parameters are of type SizeInt, which causes problems if the range to check against is of size Int64 or, worse, QWord.  It may be that after some refactoring, the nodes for such an

Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread Ben Grasset
On Sun, Jul 7, 2019 at 4:20 AM Tomas Hajny wrote: > - snip - > These are all good points! Thanks for the feedback. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread wkitty42
On 7/7/19 10:43 AM, Marģers . via fpc-devel wrote: Well, trunk i use still has no string quote character " . Maybe it's time add that too while Ben Grasset on implementing multi line strings? Just kidding... hahahaha! i guess my memory is worse than i thought! :rotflmao: truth be known, i've

Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread Marģers . via fpc-devel
  - Reply to message - From: To: > On 7/6/19 4:50 PM, wkitt...@windstream.net wrote: > >   writeln("MultiLine1= '",MultiLine1,"'"); > >   writeln("MultiLine2= '",MultiLine2,"'"); > (* i forgot to do the line for MultiLine3 *) > writeln("MultiLine3= '",MultiLine3,"'"); > (*

Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread wkitty42
On 7/6/19 4:50 PM, wkitt...@windstream.net wrote: const MultiLine = `Sentence one. Another sentence. A third sentence. A fourth sentence. A fifth sentence.`; procedure foo   procedure bar     const MultiLine1 =   `Sentence one.    Another sentence.    A third

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread Florian Klämpfl
Am 07.07.2019 um 07:33 schrieb J. Gareth Moreton: > Maybe I'm missing something painfully > obvious here. Can I request an example > where such an invalid value/undefined > behaviour crops up in bitpacked records so > I can see what's going on? Logic dictates > that the number of bits

Re: [fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

2019-07-07 Thread Tomas Hajny
On 2019-07-06 23:37, Ben Grasset wrote: On Sat, Jul 6, 2019 at 5:17 PM Ben Grasset wrote: You cannot, in my opinion at least, reasonably expect something like this to *ignore* all indentation and still function in any logical way. That the leading whitespace is taken at "face value" is a

Re: [fpc-devel] [Suggestion] Enumeration range-check intrinsic

2019-07-07 Thread J. Gareth Moreton
Maybe I'm missing something painfully obvious here. Can I request an example where such an invalid value/undefined behaviour crops up in bitpacked records so I can see what's going on? Logic dictates that the number of bits required to store an enum in that arrangement is equal to the index