[futurebasic] Re: [FB] LiteralStrings

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2016 : Group Archive : Group : All Groups

From: Bernie <bernie.fblist@...>
Date: Wed, 16 Nov 2016 07:04:39 +0000
Steve wrote:

> Sometimes I run into this problem which is likely due to the editor still using Pascal strings with their limit of 255 characters.  Is there a way to work around this limitation?
> 
> Error: ** Literal string > 255 chars in line 29 of PascalErr_NSString: 
> 29: NSString *longStr = @"This is a really long string repeated over and over which seems to go on forever and forever ===== aaaaaaaaaaaa bbbbbbbbbbbbbb ccccccccccccc dddddddddddd eeeeeeeee
> 
> BeginCCode
// …..
> NSString *longStr = @"This is a really long string repeated over and over which seems to go on forever and forever ===== aaaaaaaaaaaa bbbbbbbbbbbbbb ccccccccccccc dddddddddddd eeeeeeeeeeeee fffffffffffffffffff gggggggggggggggggg¬
> This is a really long string repeated over and over which seems to go on forever and forever ===== aaaaaaaaaaaa bbbbbbbbbbbbbb  finish.”;
// …..
> EndC

Looks like an FBtoC bug to me.

Everything inside a BeginCXxxx block should be copied (untranslated) into the Obj-C source ready for the compiler.

More observations:
[1] The continuation character (¬) must still be handled due to Editor limitations.
[2] Commenting out the long string line still throws up the error.