October 30, 2025, 05:28:03 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


ISTRING

Started by Brian, August 13, 2011, 04:12:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi,

Just realised I had an ISTRING defined, but no amount assigned, ie, ISTRING renewalDate,
when it should have been ISTRING renewalDate[16]

It didn't convert the string as it should have until I defined an amount there

So the question is: What amount would have been allocated when it was defined wrongly,
if at all, and why didn't the compiler pick up the error?

Brian

LarryMc

I did a little playing and it appears it doesn't allocate any 'default' size which is what I would expect.

I also verified there is no warning.  Sapero will need to look into it.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

New 'Feature' or minor bug?

Bill
When all else fails, get a bigger hammer.

sapero

August 13, 2011, 09:59:28 AM #3 Last Edit: August 13, 2011, 10:02:57 AM by sapero
That was just an unhandled exception. The size of buffer should be zero, and you should be not able to assign any string to it, since the parser has implemented some extra security for strings, used each time you assign an string to a variable which size is known at compile time.

Added a warning and assumed [255] characters - the default size of an string. (Updated also IWSTRING)
This update will be available after LarryS rebuilds and uploads the setup file.

Brian

Thanks, Sapero,

It was no biggie, and was easy to find once I knew the variable was empty

Brian