Skip to main content

Posts

Showing posts with the label digit

How to separate Fraction and Digit from Number in axapta

To separate Fraction and Digit from Number in axapta like number is 878778.3000 and you want to get 878778 and .300 then below code can help you to get the same. qty t=878778.3000; str _amount = strFmt("%1",num2str(t,0,1,0,0)); boolean decimals; TextBuffer txtAmount = new TextBuffer(); txtAmount.setText(_amount); if (txtAmount.find("^[0-9]+$")) // Regular expression inside the find method { decimals = true; } info(strFmt("%1 -- %2",trunc(t),frac(t)));

Bitwise operators in MSD axapta

Bitwise operators in axapta Bitwise operators are, as the name indicates, used to evaluate expression by using arithmetic and conditional operators at the bit level. These bitwise operators can only be used with integer values. A common situation for using bitwise operators is as an alternative to having a set of variables setting true or false values if you have to control some access controls with several levels. However the use of bitwise operators will make your code more difficult to read. This might be the reason that these operators are not commonly used in the standard application. In fact, the only place you may find yourself using the bitwise operators is when you are interfacing with external applications such as interacting directly with Windows API or need to do any low-level operations on the database. To be able to understand the result of an expression using bitwise operators, you will have to translate the integer values t...