Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

bug search!!

by Anonymous Monk
on Jun 20, 2000 at 19:14 UTC ( #19030=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am not able to post my question! completely as the programe is quite large(500 lines approx) buit when I try to run the programme I get the following errors syntax error at checkdataperl.p line 242, near "for" syntax error at checkdataperl.p line 243, near "++) " syntax error at checkdataperl.p line 278, near "}" Execution of checkdataperl.p aborted due to compilation errors. the lines at which error is reportes are as follows: 111 for($p=0;$p<=$n1;$p++) 112 { 113 for($n=0;$n<=7;$n++) 114 { 115 chop($arrone$p); 116 } 117 118 $corresonedname=($arrone$p."1d");$arrone$p=$arrone$p."astat.gz"; 119 120 121 if ( -e $corresonedname ) 122 { 123 124 for($j=0; $j<=$n2;$j++) 125 { 126 127 if ( $corresonedname eq $arrthree$j) 128 { 129 $arronestore$k=$arrone$p; 130 $arrtwostore$k=$arrtwo$p; 131 $arrthreestore$k=$arrthree$j; 132 $arrfourstore$k=$arrfour$j; 133 134 if (open(NAME ,"$corresonedname")) 135 { 136 137 138 $g=0; 139 140 while(<NAME>) 141 { 142 143 # Read data in 2 columns from file handle 144 # and put in two perl arrays 145 chop(); 146 ($y$g,$x$g) = split(/\s+/); 147 $g++; 148 149 } 150 151 print ("\ng=",$g,"\n"); 152 close (NAME); 153 } 154 155 156 $response="h";$r="f";$ab1=0; 157 158 while ($response ne "abcde") 159 { 160 161 @arrsidtime=("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x"); 162 163 if ($r eq "f") 164 { 165 $y1=0;$y2=0.1;$fmin=$y[0];$fmax=$y[0]; 166 for ($s1=0;$s1<($g-1);$s1++) 167 { 168 if ($fmax < $y$s1) 169 { 170 $fmax=$y$s1; 171 } 172 if ($fmin > $y$s1) 173 { 174 $fmin= $y$s1; 175 } 176 } 177 print ("\n ymax=",$fmax,"Ymin=",$fmin,"\n"); 178 $y1=$fmin; 179 $y2=$fmax; 180 $y2=($y2+0.1); 181 $y1=($y1-0.1); 182 print ("\n y2=",$y2,"y1=",$y1,"\n"); 183 while( $hour ne $arrsidtime$ab1) 184 { 185 186 ++$ab1;$ab2=$ab1 + 1;$r="t"; 187 } 188 } 189 190 pgenv($ab1,$ab2,$y1,$y2,0,0); 191 192 # Define data limits and plot axes 193 194 pglabel("X","Y",$corresonedname); # Labels 195 pgsci(5); # Change colour 196 pgline($g,\@x,\@y); 197 198 print("\n please enter your response for the plot....\n FOR SEEING THE PLOT WITH MODIFIED AXES PLEASE ENTER n \n OR GIVE THE APPROPRIATE QUALITY FACTOR FOR THE FILE FROM 1-9\n ?"); 199 $response=<STDIN>; 200 chop($response); 201 print ("you entered ",$response,"\n"); 202 203 if ($response eq "n" ) 204 { 205 print ("\n Please enter Xmin value\n"); 206 $abr1=<STDIN>;chop($abr1); 207 if ($abr1 ne "") {$ab1=$abr1;} 208 print ("\n Please enter Xmax value\n"); 209 $abr2=<STDIN>;chop($abr2); 210 if ($abr2 ne "") {$ab2=$abr2;} 211 print ("\n Please enter Ymin value\n"); 212 $yr1=<STDIN>;chop($yr1); 213 if ($yr1 ne "") {$y1=$yr1;} 214 print ("\n Please enter Ymax value\n"); 215 $yr2=<STDIN>;chop($yr2); 216 if ($yr2 ne "") {$y2=$yr2;} 217 } 218 elsif(("123456789" =~ m/$response/) && ($response ne "")) 219 { 220 $quality$k=$response;$response="abcde"; 221 print ("\n aulaity ",$k,"=",$quality$k,"\n"); 222 } 223 else 224 { 225 print "\n please enter proper response\n"; 226 } 227 } 228 if ($comparison eq $hour) 229 { 230 $k++; goto NEXTLINE; 231 } 232 else 233 { 234 $hdiffer = &get_RAdiff_fromsun($comparison,$arrthree$k); 235 236 if (($quality eq "1") && ($hdiffer >= 2)) 237 { 238 $calfilename=&gencalfn($corresonedname,$comparison) 239 if (-e $calfilename) 240 { 241 $c2=$c2-1; 242 for($c3=0;$c3<=$c2;$c3++) 243 { 244 if(($calfilename eq $calqname$c3) && ($calqfour$c3 eq "1") && ($calqthree$c3<=100)) 245 { 246 $gooddata="/usr4/mrt/vinayPandey/good".$hour; 247 if (-e $gooddata) 248 {open(FILE, ">>$gooddata"); 249 } 250 else 251 { 252 open(FILE,">$gooddata"); 253 } 254 $qnet=1; 255 print FILE "$arrthreestore$k $arrfourstore$k $arrtwostore$k $quality$k $calqone$c3 $calqtwo$c3 $calqthree$c3 $calqfour$c3 $qnet \n"; 256 close(FILE); 257 $k++; 258 goto NEXTLINE; 259 } 260 else 261 { 262 if ($calfilename eq $claname$c3) 263 { 264 $c2++; 265 $k++; 266 goto NEXTLINE; 267 } 268 } 269 } 270 } 271 } 272 $k++; 273 goto NEXTLINE; 274 275 } 276 } 277 } 278 } 279 else 280 { 281 print "\n we are not able to find file $corresonedname\n"; 282 } 283 NEXTLINE: 284 }

Comment on bug search!!
Re: bug search!!
by redmist (Deacon) on Jun 21, 2000 at 16:34 UTC
    Please use the <code> and  <pre> tags.
Re: bug search!!
by slayven (Pilgrim) on Jun 21, 2000 at 18:20 UTC
    you forgot a ; in line 238
    $calfilename=&gencalfn($corresonedname,$comparison);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://19030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-25 11:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls