Code Syntax

Hi All, I hope that I don’t expose my ignorance toooooo much with this question, but… I am working on some code in 3.10 and came across the following in codeunit 22: ==================== IF IsTransferReceipt THEN BEGIN ItemTrackingLine2 := ItemTrackingLine; ItemTrackingLine2.“Quantity Shipped” += ItemTrackingLine2.“Qty. to Ship/Receive”; ItemTrackingLine2.“Quantity Invoiced” += ItemTrackingLine2.“Qty. to Ship/Receive”; ItemTrackingLine2.“Outstanding Quantity” -= ItemTrackingLine2.“Qty. to Ship/Receive”; ItemTrackingLine2.“Qty. to Ship/Receive” := ItemTrackingLine2.“Outstanding Quantity”; ItemTrackingLine2.MODIFY; ====================== My question is: What is " -= " and " += "? I’ve never seen this in any other code in Navision before. As always, thanks for the help. I’m privelaged to have access to a group of the most talented Navision people in the world!! Regards, Mark. Mark Keener Automated Number Crunching Dayton, OH USA

It simply increments or decrements the integar by the value after it. So, for instance, ItemTrackingLine2.“Quantity Shipped” += ItemTrackingLine2.“Qty. to Ship/Receive”; is a quicker way of saying ItemTrackingLine2.“Quantity Shipped” := ItemTrackingLine2.“Quantity Shipped” + ItemTrackingLine2.“Qty. to Ship/Receive”;

Wow!!! That makes sense! Thanks so much for you help, Mark. Mark Keener Automated Number Crunching Dayton, OH USA

This “C” like syntax applies to the 4 arithmetics operations : This also works in Financials not just Attain BufferStock := (BufferStock + Qty); ----> BufferStock += Qty; BufferStock := (BufferStock - Qty); ----> BufferStock -= Qty; BufferStock := (BufferStock * Qty); ----> BufferStock *= Qty; BufferStock := (BuuferStock / Qty); ----> BufferStock /= Qty; ###### tarek_demiati@ureach.com