hello i am trying to convert this BASIC code to C code :
BASIC code:it is in another language german i think LUNDI i think is monday)
Code:
smybol NBALARM=16'
const alarmTable as byte[NBALARM*4]=('
DAY HOUR MINUTE DURATION
LUNDI, 8, 30, 10,
LUNDI, 12, 30, 10,
LUNDI, 14, 00, 10
)
my c code at the moment:
Code:
char alarm[3][100]={
Code:
// Day hour: minute: seconds:
"Monday, 8, 30, 10,",
"Tuesday, 9, 30, 10,",
"Wednesday, 10, 00, 14,"
}
;
note: Monday, Tuesday ,Wednesday and LUNDI are all defined above the array as ints with values like 0,1...
at the moment my code compiles but i know that in the future if i keep my array as a char it will cause problems because i would have to split it. so i want my array to be somewhat in the form of:
Code:
int alarm[3][100] as byte[alarms *4] (or something)={
// Day hour: minute: seconds:
"Monday, 8, 30, 10,
Tuesday, 9, 30, 10,
Wednesday, 10, 00, 14
};
i know the code above probably does not compile but you get the idea.