The x:=x;
section would normally be used to set the value of x
eg:
WhilePrintingRecords;
Shared numbervar x;
x:=10;
Running this code sets the variable and returns the value set (as long as only a single variable is set), to also return the value of the variable you can add:
WhilePrintingRecords;
Shared numbervar x;
x:=10;
x
Or if the variable is set elsewhere, to return the value you can do:
WhilePrintingRecords;
Shared numbervar x;
x