openedge - Progress if statement -
openedge - Progress if statement -
i'm progress noob, having problem basic blocks.
below issue in if else statement. works fine when if, then, else then, when want set in more 1 statement if portion, have set in block, i'm using if, do: else, do: these aren't working me. obvious errors can see? error message **colon followed white space terminates statement. (199)
input "r:\_content\stephen\4gl apps\dpl\output.csv". repeat: assign i_cntr = (i_cntr + 1). myrow = "". import delimiter ',' myrow. if myrow[5] <> "" do: /*change assign 2 rows - 2 creates - 2 sets of four*/ c_fname = myrow[1]. message c_fname skip myrow[2] skip myrow[3] skip myrow[4] skip myrow[5] skip i_cntr view-as alert-box info buttons ok. end./*end of if, do:*/ else if myrow[5] = "" do: message myrow[1] skip myrow[2] skip myrow[3] skip myrow[4] skip i_cntr view-as alert-box info buttons ok. end./*end of else if, do:*/ end./*end of repeat*/
a simple syntax error: need @ to the lowest degree 1 space after end-statement.
end. /*end of if, do:*/ /* ^ create sure there's space above here! */
and if don't want follow first-class advice in tims reply (use case). "complete" syntax of if statement.
if expression1 do: /* code goes here */ end. else if expression2 do: /* code goes here */ end. else do: /* code goes here */ end.
expressions:
a constant, field name, variable name, or look value logical (true or false). look can include comparisons, logical operators, , parentheses.
you can leave out do: end. when if code executed consists of single statement:
if true display "true". else display "not true".
you utilize other block-statements (such or repeat) create code hard read.
progress-4gl openedge
Comments
Post a Comment