yeah..u r right. I have not posted the complete code. I an doing that now:
sub find_range { my $max=$_[0]; my $min=$_[1]; my $step=$_[2]; my @step_part; my $range; $dec_lolmt=0; # for avoiding positive offset in compu method any min data gr +eater than zero is made equal to zero. if ($min>0) { $dec_lolmt=$min; $min=0; print OUT_LOG "WARNING: minimum physical value found to be + positive for $name and is reduced to zero \n"; } my @step_part=split(/\//,$step); if($step_part[1]=~ /^[0-9]/) { $step_real=$step_part[0]/$step_part[1]; } else { $step_real=$step_part[0]; } # check for proper value of range could be returned or not if((!($step_real=~ /^[0-9]/))||($max==$min)||($step_real==0)| +|(!($step_real =~ /^-?\d/))) { print OUT_LOG "WARNING: No proper range could be determine +d for $name : default range returned as 255 \n"; $range = 255; } $range=($max-$min)/($step_real); # check if range is feasible or not(range cannot be less than +1) if($range<1) { print OUT_LOG "WARNING: No proper range could be determine +d for $name : defalult range returned as 255 \n"; $range = 255; } return($range); }
The split is done to obtain the actual step values in cases where i read (say:100/65535) at step(read resolution). the reading tagged data function is:
sub read_tagdata { my $tag_start= $_[0]; #read the start of the tag my $tag_end=$_[1]; #read the end of the tag my $temp_buffer_data= $_[2]; #read the tagged line my @buffer_data_split; $tag_error=($temp_buffer_data=~ s/$tag_start/;/); $tag_error1=($temp_buffer_data=~ s/$tag_end/;/); if (($tag_error==0) || ($tag_error1==0)) { if(!($tag_start=~ /parameter/) && !($tag_start=~ /intern/) + && !($tag_start=~ /out/) && !($tag_start=~ /visu/)) { print OUT_LOG "WARNING: No data found at $tag_start + $tag_end for $name_data \n"; $buffer_data_split[1]="UNKNOWN DATA"; } } else { @buffer_data_split= split(/;/,$temp_buffer_data); } return($buffer_data_split[1]) }
since i am very new to all this i thought that my code may seem stupid to u guys!! thats why i was hiding some part. But now I DONT CARE!!!!

In reply to Re^4: int's behaviour by last_stand
in thread int's behaviour by last_stand

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.