Go Down

Topic: Names starting with Number, sometimes only? (Read 899 times) previous topic - next topic

Escrich

Dear all, I'm writing you because I'm surprised with Arduino IDE behaviour, as you know every sketch must be included inside a folder with the same name, as you know in the name you cannot have spaces, and this name should not start with a number, those are the known rules, but sometimes are applicable and sometimes are not, and I want to know, why, under which circumstances could I start the name by a number, because I know this is possible, but I cannot find the rules to do it.
Regards:
JME




As someone wrote before, some hours reading and trying to understand the problem, are able to solve any software problem, or at least the most of them.

ballscrewbob

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google (who would have thunk it ! ) or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

pert

Support for sketch names starting with a number was added Arduino IDE 1.8.4. So if you are using Arduino IDE 1.8.3 or older, or want to share your sketches with people using significantly outdated versions of the Arduino IDE, then you should not start the sketch name with a number. If your sketch is intended to be used with the modern versions of the Arduino IDE, then you're welcome to start it with a number.

I cannot find the rules to do it.
Well, it's here in the Arduino Sketch Specification:
https://arduino.github.io/arduino-cli/latest/sketch-specification/#sketch-root-folder
but you'll notice that it says spaces are also allowed. Support for spaces was recently added, but it is only available in Arduino CLI, and not yet in Arduino IDE. I have it on my "to do" list to improve the documentation regarding the support for spaces.

Escrich


Sorry, but I can not totally agree with you, now I have version 1.8.13, the last one you can find on Arduino.cc, and with this version you can save a file with name starting by a number, but, if you open previous sketches, not always you're able to save it with name stating by number, may depends on the sketch itself because I don't know which reasons, maybe there is a bug, and not always can handle names in the right way.
Thanks for your answers and your time to all of you
As someone wrote before, some hours reading and trying to understand the problem, are able to solve any software problem, or at least the most of them.

pert

If you will provide specific instructions I can use to reproduce the issue, I'll investigate and see if I can discover the problem.

Go Up