What kind of naming convention should be followed in LabVIEW? Shall I use typical CamelCase (MyNewProgram.vi) or with underscore (My_New_Program.vi) or with spaces (My New Program.vi)? In most of the standard LabVIEW programs I have observed that namings are with spaces (My New Program.vi) but most of the text language programmers prefer without spaces convention. Which is the best way to name VI or variable in LabVIEW and what is the reason for that?
I went through the guidelines and different post but they just mention not to use special character. Nowhere I found the standard convention of naming in LabVIEW.
Solved! Go to Solution.
In LabVIEW environment it's define as My New Program.vi, take a look at the LabVIEW functions palette. Me I use MyNewProgram.vi as a diagram must stay smaller than a screen size, the smaller your label are the better.
Thank you sabri.jatlaoui for the answer.
Yes LabVIEW standard functions uses name with spaces but what is the reason other programming language defines NoSpace naming as standard practice and what makes LabVIEW different from other languages to use spaces. I am working with another team who uses NoSpace convention and I am forced to use NoSpace. I want to explain to them which convention gives advantage in LabVIEW. As standard LabVIEW uses spaces there must be a reason.
In some languages he space is the end of the string. So if you have 2 words in you function name and you put a space between them it can be understood as 2 different elements.
Not In LabVIEW. You can find some naming convention here http://www.ni.com/white-paper/5560/en/#toc5. But as I said earlier MyNewCode.vi could be a good choice to minimize use space in your diagram.
The Camel Case originated from the DOS days when you were only allowed 8 characters to a file name. Windows allows spaces in file names. Linux does not. Due to the Linux/Unix limitation, you will often see text language programmers use the underscore. Almost all of my code is on Windows, so I use spaces in my file names simply because I find it easier to read than with the underscores.
You are incorrect.
Linux allows spaces in file names. Has got a plenty of them on my drive, some with creation date year 2007 (year when I switched to linux).
The reserved characters on NTFS (still very spread in windows systems, introduced 1993 with windows NT) are:
0x00-0x1F 0x7F " * / : < > ? \ |
The ext2 filesystem, introduced in 1993 with linux, has only two following reserved characters: