class IntValue 
	begin
		instance 
			int value = 0;
			int set( int value; )
				begin
					int oldValue = this.value;
					this.value = value;
					return oldValue;
				end
	end

IntValue intValue = new IntValue;

int newValue = 123;
int oldValue = intValue.set( newValue );
