LabWindows/CVI Idea Exchange

Community Browser
Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

Greetings,

 

LabWindows/CVI 9.0.1's implementation of <stdio.h> *scanf and <stdlib.h> strtod functions appears not to support reading back "NaN", "Inf", "+Inf" or "-Inf" values, although printf() can generate them. May I suggest to add functionality like described below.

 

Practical use would be that it's easier to propagate "invalid measurement" through strings if strto*() and *scanf() understand all classes of strings that *printf() family functions will generate.

 

This suggestion is in alignment with ISO 9899:1999 (withdrawn) and its successor ISO 9899:2011, i. e. C99 and C11. Note that there is a "stronger" suggestion to implement all of the C11 standard library in the idea exchange already, which - if implemented - would subsume this suggestion, but as the bare minimum, I'd certainly appreciate seeing this in CVI 2012.

 

Demo code:

 

 printf("%g\n", -NotANumber());
 printf("%+g\n", PositiveInfinity());
 printf("%g\n", NegativeInfinity());
 double x = 0; int i;
 i = sscanf("NaN", "%lf", &x); printf("i=%d, x=%g\n", i, x);
 i = sscanf("Inf", "%lf", &x); printf("i=%d, x=%g\n", i, x);
 errno = 0; x = strtod("NaN", NULL); printf("x=%g, errno=%d\n", x, errno);

 

Desired result:

 

 -NaN

 +Inf

 -Inf

 i=1, x=NaN

 i=1, x=Inf

 x=NaN, errno=0

 

Actual result: we see that printf supports NaN/Inf, but scanf and strtod do not:

 

 NaN
 +Inf
 -Inf
 i=0, x=0
 i=0, x=0
 x=0, errno=0

 

Thank you.

 

I would consider it useful if the Build Output would state the total number of errors in a file - right now it says: 1 file with errors, but especially if you start with many errors I find it helpful to see if a change in code reduces the error count.

 

To my knowledge earlier versions of CVI provided this information, which disappeared with clang integration.

 

Related posts are here and here

Currently the 'long double' type has 64 bits of precision, which is the same as the 'double' type.  It would be handy on occasion to be able to use the full 80 bits of precision like is available with the Intel compiler.

A byte array is limited to 2GB because the index is an int. Allow the use of long for an index so large arrays can be used.

Tiling windows is only possible, when they are released from the IDE before. But navigating between the IDE and the released windows is difficult. It would be nice if the sourcecode and uir windows could be tiled INSIDE the IDE. Could look like this:

tiledwindow.JPG

Can you add new argument for CVI CLI (i.e. ...\CVI2013\compile.exe)

which will dump the build output to a file (similar to the -log LOGFILE argument) ?

current options provide only PASS/FAIL for the compile without providing enough information 

In cvicc (CVI compiler for Linux), there's an option -DDEFINE to define a macro, but no equivalent -U to undefine it. It would be useful because the macros defined in [Options][Build Options][Compiler defines] are indeed used by cvicc when compiling on Linux. If I need a project-level macro defined on Windows but not on Linux, I don't know how to remove it except by parsing it out of the prj file before compilation.

 

The most recent version of the C runtime that comes with the Phar Lap ETS is msvcr90 from 2008. That really restricts the usage of more recent third-party libraries on real-time targets shipping this operating system.

 

Support for msvcr{100,110,120,140}, even with stubs for most of their functions, would be greatly appreciated.

The addition of structured exception handling (SEH) would be a welcomed addition to CVI. This would allow for much cleaner handling of complex exception situations.

 

 

Wenn ein Rechner nicht am Nezt ist, vielleicht das Kabel nicht richtig drin oder am Platz kein Netz mehr frei ist, dann wird CVI mit einer eingeeschränkten Testlizenz gestartet und würde dann eine EXE generieren, welche in der Laufzeit eingeschränkt ist. Oft ist es der Fall, dass jemand CVI ohne Netzt started um im Quelltext etwas zu kontrollieren. Zu einem späteren Zeitpunkt erstellt jemand eine EXE neu und bemerkt nicht, dass das gestartete CVI keine Lizenz hat, obwohl der Rechner Netz hat. Er müsste erst CVI neustarten um die Lizenz zu holen.
Den Fehler bemerkt er erst am Folgetag, wo das Programm mit einem Fehler abgebrochen wird.
Es wäre aus meiner Sicht sehr sinnvoll, dass eine EXE, welche durch CVI ohne Lizenz erstellt wird, auch einen Popup mit eingebaut bekommt, welcher hiervor warnt.
Auch eine Abfrage, welche der Progrmmierer in sein Programm einbauen kann wäre sehr Hilfreich.

The C preprocessor in other compilers has seen some improvements over the years. Maybe you could freshen the CVI one up a little bit. With most modern C compilers there are some pretty advanced things that can be done in the preprocessor. But include those header files into a CVI project, and you start getting errors in the strangest places. And the cause of these isn't even some nasty trick, but pretty basic stuff for any other preprocessor.