While reading through Wikipedia, I came across something called a quine, and here is its definition:
In computing, a quine is a computer program which produces a copy of its own source code as its only output.
I was inspired by this and decided to make a quine in X++, the programing language of Microsoft Dynamics AX.
static void quine(Args _args)
{
#AOT;
print TreeNode::findNode(strfmt(#JobPath,"quine")).AOTgetSource();
pause;
}
It’s a job that finds it’s own tree node in the AOT, gets the source of that node and prints it. I originally wrote it all on one line, because I like the look of that better, but I didn’t do that here for readability.
Now I’m not entirely sure if this qualifies as a quine, because a quine can have no input, and using the method AOTgetSource could be seen as cheating. But anyway, it reproduces itself, it’s short, and it made me happy
Monday, August 24, 2009
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
Combo boxes in Dialogs are added by adding a DialogField object with the type of an enum. The enum is then controlling what items you can pi...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
No comments:
Post a Comment