Re: variable start values
- Posted by "Igor Kachan" <kinz at peterlink.ru> Dec 10, 2003
- 479 views
Hi Jason, ---------- > From: Jason Dube <dubetyrant at hotmail.com> > Subject: variable start values > > > Hi, > Im writing a simple punctuation checker, > I get the following message > when I try to execute this: > > "capital1 has not been assigned a value" > > function check_for_punc_1(object x) > boolean capital1 > if x[1][1] < 90 then > position(2,1) > puts(1,"GARBLE: [Sentence is not capitalized...]") > capital1=0 > end if > return capital1 > end function Try please instead: function check_for_punc_1(object x) boolean capital1 if x[1][1] < 90 then position(2,1) puts(1,"GARBLE: [Sentence is not capitalized...]") capital1=0 else -----<---- new capital1=1 -----<---- new end if return capital1 end function [snipped] Regards, Igor Kachan kinz at peterlink.ru