B
bayxarea-usenet
I am getting the following error during compiling:
'switch expression not integral'
I am new to the switch command - here is a snip of my code where I have
used this.. .. what is the problem here? Thanks!
------------- snip --------------------------
for (ii = 0; ii < n; ii++)
{
if (!UF_OBJ_ask_name(members[ii], obj_name))
{
sprintf(msg,"\nObject #%d has an object tag = %d and is named
%s,",ii,members[ii],obj_name);
WRITE(msg);
UF_CALL(UF_DRF_ask_draft_aid_text_info(members[ii], &nn,
&text_info));
for (iii=0; iii<nn; iii++)
{
WRITE3F(text_info[iii].origin);
for (jj=0; jj<text_info[iii].num_lines; jj++)
{
sprintf(msg, " %s\n", text_info[iii].text[jj].string);
UF_UI_write_listing_window( msg );
}
}
UF_CALL(UF_DRF_free_text(nn, &text_info));
switch (obj_name)
{
case "NOTE TEXT CP SL":
uc5566(members[ii], 1, 6, "J");
break;
case "NOTE TEXT CP COC":
uc5566(members[ii], 1, 6, "O");
break;
case "NOTE TEXT CP PQP":
uc5566(members[ii], 1, 6, "H");
break;
case "NOTE TEXT CP FRD":
uc5566(members[ii], 1, 6, "N);
break;
case "NOTE TEXT CP SC":
uc5566(members[ii], 1, 6, "P);
break;
default:
break;
}
}
}
'switch expression not integral'
I am new to the switch command - here is a snip of my code where I have
used this.. .. what is the problem here? Thanks!
------------- snip --------------------------
for (ii = 0; ii < n; ii++)
{
if (!UF_OBJ_ask_name(members[ii], obj_name))
{
sprintf(msg,"\nObject #%d has an object tag = %d and is named
%s,",ii,members[ii],obj_name);
WRITE(msg);
UF_CALL(UF_DRF_ask_draft_aid_text_info(members[ii], &nn,
&text_info));
for (iii=0; iii<nn; iii++)
{
WRITE3F(text_info[iii].origin);
for (jj=0; jj<text_info[iii].num_lines; jj++)
{
sprintf(msg, " %s\n", text_info[iii].text[jj].string);
UF_UI_write_listing_window( msg );
}
}
UF_CALL(UF_DRF_free_text(nn, &text_info));
switch (obj_name)
{
case "NOTE TEXT CP SL":
uc5566(members[ii], 1, 6, "J");
break;
case "NOTE TEXT CP COC":
uc5566(members[ii], 1, 6, "O");
break;
case "NOTE TEXT CP PQP":
uc5566(members[ii], 1, 6, "H");
break;
case "NOTE TEXT CP FRD":
uc5566(members[ii], 1, 6, "N);
break;
case "NOTE TEXT CP SC":
uc5566(members[ii], 1, 6, "P);
break;
default:
break;
}
}
}