LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Jim_Kring

String Constant becomes Empty String Constant when empty

Status: New
26 Comments
wiebe@CARYA
Knight of NI

ah, so accidentally "pi" would work (p for pico, i from inf), but "ln(10)" won't.Smiley Sad

AristosQueue (NI)
NI Employee (retired)

No, "pi" wouldn't. It wouldn't parse as a token. You can do alphanumeric entry, but it has to pass tokenization. If LV cannot parse your input string into something meaningful, the input is rejected. "pi" is not currently a token.

wiebe@CARYA
Knight of NI

Not sure where the token part kicks in. Seems you're skipped a part to some underlying implementation already.

 

It's definitely possible to type "pi" in a numeric. Reading it with numeric.text also works. I've tested it before the previous post.

AristosQueue (NI)
NI Employee (retired)

> It's definitely possible to type "pi" in a numeric. Reading it with

> numeric.text also works. I've tested it before the previous post.

 

I just tested 2018 back to 2015: drop a numeric control, type "pi", hit enter. The text in the numeric it immediately reverted to the previous value (zero). I tried typing other valid values in, committing those, then typed "pi", hit enter. Again, reverted to the previous value. I could not find any way to enter "pi" as the value for a numeric.

wiebe@CARYA
Knight of NI

Well, isn't that where the idea comes in? I know "pi" isn't excepted as value... When "pi" is entered, and the value is committed, before (or during) tokenizing it should be replaced with a pi constant. That's the idea, not how it is right now.

JW-JnJ
Active Participant

This is brilliant.

 

I would like to add empty path to the list.

Josh
Software is never really finished, it's just an acceptable level of broken
Jim_Kring
Trusted Enthusiast

That's a good idea Josh (@JW-JnJ) -- handling empty path in a similar way.

 

What's tricky is that empty path has a special meaning (it's not really "empty" per se):

http://zone.ni.com/reference/en-XX/help/371361P-01/lvhowto/empty_paths/

 

On Linux, it's the root folder ("/") of the file system. On Windows, listing the contents of an empty path will return all the driver letters.  So, it might be tricky to do this. Maybe it would magically show up as a forwardslash ("/") if empty -- but, that might be confusing (although informative, for what it's worth).

Henrik_Volkers
Trusted Enthusiast

Numeric input allow all SI prefixes and complex numbers, so  .. Pi and pi could be

Penta or pico of sqrt(-1)  🙂 

will e be for 1e10 or numeric epsilon or e ... ?

\Pi  Pi()  pi() ... as long as the tokens are documented I'm fine with it.

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


altenbach
Knight of NI

 Part of the problem is that a string diagram constant that is empty is actually wider than a string diagram constant containing a single space (at least using a proportional font, I assume). Another solution would be if an empty string diagram constant would be narrower than any constant containing text. For example, the interior could be only 2-3 pixels wide, just enough to click and insert text if needed.

TomOrr0W
Member

Slightly broader duplicate idea (auto-declined due to insufficient kudos):

https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Updating-the-string-constants/idi-p/1850571