Navigation:  ABC Library Reference > ASCIIFileClass > AsciiFileClass Methods >====== GetPercentile (convert file position to percentage:ASCIIFileClass) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetPercentile( line number )

blk2blue.jpg

GetPercentile Returns the specified position in the file as a percentage.
line number An integer constant, variable, EQUATE or expression that contains the offset or position to convert to a percentage.

The GetPercentile method returns the specified position in the file as an approximate percentage, which can be used to position a vertical scroll bar thumb.

Return Data Type:     USHORT

Example:

SetThumb ROUTINE

!current line is what % thru the file?

PctPos=MyASCIIFile.GetPercentile(MyASCIIFile.TopLine+CHOICE(?ASCIIBox)-1)

?ASCIIBox{PROP:VScrollPos}=PctPos       !set thumb to corresponding % position