#1 18-11-2008 20:53

Devan_LT
Registered: 29-08-2007
Posts: 21

Position in the file

I want to choose current position in the file (position that data is read from). Is it possible? If not, could an opcode be created in the next version of CLEO?

Offline

#2 19-11-2008 12:18

Seemann
Registered: 07-08-2006
Posts: 2,155

Re: Position in the file

0AA5: call 0x538990 num_params 3 pop 3 $from $offset $file

$file - file pointer
$offset - Number of bytes from $from
$from - Initial position (usually 0)

Offline

#3 19-11-2008 14:17

Devan_LT
Registered: 29-08-2007
Posts: 21

Re: Position in the file

Thanks! But I don't understand a little bit. Does it sum $from and $offset or what?

Offline

#4 19-11-2008 14:49

Seemann
Registered: 07-08-2006
Posts: 2,155

Re: Position in the file

yes, it could be said that it sums $from and $offset

Offline

#5 19-11-2008 15:28

Devan_LT
Registered: 29-08-2007
Posts: 21

Re: Position in the file

Thanks again smile

Offline

#6 19-11-2008 18:42

listener
From: Vice City
Registered: 09-11-2006
Posts: 616
Website

Re: Position in the file

@Devan_LT

$from defines starting point:

0 - seek from start of the file;
1 - from current position ($offset can be negative)
2 - from end of file

Offline

#7 19-11-2008 22:40

Devan_LT
Registered: 29-08-2007
Posts: 21

Re: Position in the file

Ok, now I understand this, thanks smile

Offline

Board footer

Powered by FluxBB