B
Bryan Crouse
I am looking a way to do error checking on a string at compile time,
and if the string isn't the correct length have then have the compiler
throw an error.
I am working an embedded software that will require individual builds
for each device so that the device serial number is contained in the
program memory. To do this, the C application must be compiled with
the serial number assigned to a variable within the source code file.
I would like to provide compile time error checking within the .c file
if possible so that if the length of the string is not correct, then
the build process will fail and there is no risk of having an
executable that has a bad serial number.
Has anyone heard of this or done this sort of thing? Any advice would
be greatly appreciated.
Thanks!
and if the string isn't the correct length have then have the compiler
throw an error.
I am working an embedded software that will require individual builds
for each device so that the device serial number is contained in the
program memory. To do this, the C application must be compiled with
the serial number assigned to a variable within the source code file.
I would like to provide compile time error checking within the .c file
if possible so that if the length of the string is not correct, then
the build process will fail and there is no risk of having an
executable that has a bad serial number.
Has anyone heard of this or done this sort of thing? Any advice would
be greatly appreciated.
Thanks!