Post B387HLEXHUTdBeUjiq by trurl@mastodon.sdf.org
(DIR) More posts by trurl@mastodon.sdf.org
(DIR) Post #B383thkLcujuCJPbjU by foone@digipres.club
2026-02-09T01:10:11Z
0 likes, 0 repeats
dos/windows batch files are so much fun.what does this output?SET FOO = BARECHO %FOO%
(DIR) Post #B383weMEgPBgYWXR3Y by foone@digipres.club
2026-02-09T01:10:31Z
0 likes, 0 repeats
it prints:%FOO%
(DIR) Post #B383zH6FbyFjI9JTGq by foone@digipres.club
2026-02-09T01:11:02Z
0 likes, 0 repeats
The reason? The space before the equals. SET FOO = BAR actually sets the environment variable "FOO " to " BAR"
(DIR) Post #B3845ZOqUArFml0pOq by foone@digipres.club
2026-02-09T01:12:22Z
0 likes, 0 repeats
yeah sure environment variables can have spaces in them, that's not a mistake that is just going to cause problems
(DIR) Post #B387HLEXHUTdBeUjiq by trurl@mastodon.sdf.org
2026-02-09T01:48:04Z
0 likes, 0 repeats
@foone not sure if I should be proud for getting this one right immediately. I haven't done any batch file programming in 25 years, but it was one of the first languages I was exposed to, so some of the nonsense stuck. (Limited access to real language environments on un-networked home MS-DOS PCs meant that I had to turn to desperate measures to scratch the "I want to program stuff" itch. Super grateful that MS-DOS 6.0 actually had decent help files.)
(DIR) Post #B38ZM3kiV2lr8RaLUO by misty@digipres.club
2026-02-09T07:02:39Z
0 likes, 0 repeats
@foone OH NO