Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » NFormat and crash of the program
NFormat and crash of the program [message #6868] Fri, 01 December 2006 22:38 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

my app crashes with the following box message in debug:

-----------------------------------------------------------
Assertion failed in c:\upp\uppsrc\Core\Format.cpp line 979
0
-----------------------------------------------------------

at the line:
  name = NFormat("%sscrgrp.html", TD.PATHDIRWWW);

Instead it does not crash if I use:
  name = TD.PATHDIRWWW + "scrgrp.html";


Who can explain me why? (I suspect the two "s" produce some troubble)

Luigi
Re: NFormat and crash of the program [message #6869 is a reply to message #6868] Fri, 01 December 2006 22:50 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Unfortunately, while Format (NFormat is identical to Format for more than year now) maintains similarity to "printf" formating, there is a catch - in order to allow extending Format, the format is specified by ALL alpha characters after the % - so in this case, it is "%sscrgrp". You can delimit it using '`':

"%s`scrgrp.html"

BTW, it release mode, it would most likely worked as expected - if type is not found, Format starts trimming the identifier performing more searches until it founds %s (but of course, this is just to prevent unexpected surprises in legacy code).

Mirek
Previous Topic: bad visualization of a column list
Next Topic: [Possible bug] Geometry - Point
Goto Forum:
  


Current Time: Sun Apr 28 21:24:18 CEST 2024

Total time taken to generate the page: 0.04106 seconds