04-13-2022 08:52 AM
The detailed help warns of this exact scenario (LV 2020 SP1)
"Partial paths, such as test\subtest, are not valid as array elements..."
04-13-2022 08:58 AM
@JÞB wrote:
@paul_cardinale wrote:
@AeroSoul wrote:
ah, so it's more for universality among different OS.
I operate exclusively on windows, so i usually just use strings.
Lacking a crystal ball, I don't assume that my code will never be used with a different file system; I consider such an assumption to be bad coding practice.
I don't Amazon anymore (they sold me some counterfeit goods (at my age and grumpiness level, crap on me one time and you're on my s-list)).
04-13-2022 09:07 AM
Based on what you are explaining, it sounds like cryptomacia to me. I call it cryptomacia.
04-13-2022 09:58 AM
@Frozen wrote:
The detailed help warns of this exact scenario (LV 2020 SP1)
"Partial paths, such as test\subtest, are not valid as array elements..."
This remark already exists with LV15, the oldest version installed on my computer.
04-13-2022 10:23 AM - edited 04-13-2022 10:27 AM
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
04-13-2022 02:16 PM
wiebe@CARYA wrote:
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
That look will work only if the path element delimiter embedded in the strings matches the delimiter used by the current file system.
The reason that paths are a different data type from strings is to avoid the issue of different delimiters on different systems.
04-14-2022 03:26 AM
@paul_cardinale wrote:
wiebe@CARYA wrote:
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
That look will work only if the path element delimiter embedded in the strings matches the delimiter used by the current file system.
The reason that paths are a different data type from strings is to avoid the issue of different delimiters on different systems.
That look? Not sure what you mean...
04-14-2022 07:47 AM
wiebe@CARYA wrote:
@paul_cardinale wrote:
wiebe@CARYA wrote:
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
That look will work only if the path element delimiter embedded in the strings matches the delimiter used by the current file system.
The reason that paths are a different data type from strings is to avoid the issue of different delimiters on different systems.
That look? Not sure what you mean...
That's a strange editing mistake. I'll chalk it up to a brain cramp on my part. It should read "That will work only ..."
04-14-2022 09:37 AM
@paul_cardinale wrote:
wiebe@CARYA wrote:
@paul_cardinale wrote:
wiebe@CARYA wrote:
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
That look will work only if the path element delimiter embedded in the strings matches the delimiter used by the current file system.
The reason that paths are a different data type from strings is to avoid the issue of different delimiters on different systems.
That look? Not sure what you mean...
That's a strange editing mistake. I'll chalk it up to a brain cramp on my part. It should read "That will work only ..."
A, maybe you mend "That loop will work only..." That makes sense and explains the typo.
I think we're in agreement here.
There are two flavors:
1) Use a loop and build path-> The strings can be compound, but must be system delimiters
2) Use an array -> Strings can't be compound.
04-18-2022 08:58 AM
wiebe@CARYA wrote:
@paul_cardinale wrote:
wiebe@CARYA wrote:
@paul_cardinale wrote:
wiebe@CARYA wrote:
A "path to string" and then a "string to path" 'resolves' the problem.
Flattened data shows the differences:
Changing the flattened data to hex reveals that the path is actually internally stored as an array of items, and Array To Path simply put's each item in an array element
Here's another way to do it 'right' (on windows):
And that is what you'd expect Array of String to Path to do...
It's not a bug, it is somewhat unexpected:
That look will work only if the path element delimiter embedded in the strings matches the delimiter used by the current file system.
The reason that paths are a different data type from strings is to avoid the issue of different delimiters on different systems.
That look? Not sure what you mean...
That's a strange editing mistake. I'll chalk it up to a brain cramp on my part. It should read "That will work only ..."
A, maybe you mend "That loop will work only..." That makes sense and explains the typo.
I think we're in agreement here.
There are two flavors:
1) Use a loop and build path-> The strings can be compound, but must be system delimiters
2) Use an array -> Strings can't be compound.
Yes, that's what I "mend". 😀