Alarm Clock Demo error?
When attempting to run the Alarm Clock Demo using the EM-1000 EV board I get:
error c1006: functions must have return values
Please advise.
Thanks You
error c1006: functions must have return values
Please advise.
Thanks You
Follow this discussion to get notifications on your dashboard.
-
Inappropriate?Weird that this error is in a demo file.
You must go to the project files global.thb and main.tbs and complete the function statment for the set_alarm and set_time with "as string" in the end.
For example in global.thb line 3, where is,
declare function set_alarm(hr as string, min as string, sec as string)
it should be,
declare function set_alarm(hr as string, min as string, sec as string)as string
do this for set_alarm and set_time fucntion statments on global.thb and main.tbs and it should work.
I don't have a EM1000, i just use EM1202, so can't run it, but it does compile ok, after this modification. -
Inappropriate?Thanks -- that did the trick. This is a cool demo!
-
Inappropriate?Hmm... it seems that since this demo was developed when the rule to differentiate function and sub was not enforced. The proper way, according to the logic of the demo, is to change the two functions into subs. The demo was adjusted to reflect this.
-
Thanks T-Bone! :) -
Inappropriate?You're right t-bone, altough the "as string" addition will work, changing the functions to subs does make the routines more in-sync with the program logic.
I’m glad to help
Loading Profile...




