DOORS DXL - Introduction » TheCloudStrap (2024)

DOORS DXL - Introduction » TheCloudStrap (1)

DOORS DXL – Introduction

Table of Contents hide

1. DOORS DXL – Introduction

1.1. What is DXL?

1.2. Features of DXL Scripting:

1.3. Is DXL interpreted or compiled?

1.4. Hello World Program in DXL

1.6. Hello World Program Output

1.7. Print Function – String

1.8. Print Function – Other Data Types

1.9. Conclusion

1.10. Related posts:

In this series of articles, I am going to explain to you IBM DOORS DXL scripting from scratch. So, if you are a beginner in DXL scripting, hopefully, this article will help you. This is part-1 of the DOORS DXL tutorial.

So, if you are looking for a starting point to learn DXL scripting and looking for a DOORS DXL tutorial, you are on the right page! I know, there is a DXL reference manual and it’s a bit concise and difficult to grasp for newcomers, especially if you do not have any previous experience in other programming languages.

In this article series, I will explain the basic concepts of DXL scripting step-by-step with simple enough DXL scripts.

This is our first article in this series, and I will explain how to write a simple DXL script to print the “Hello World” string.

What is DXL?

DXL stands for DOORS eXtension Language. It is a scripting language for rational DOORS. The Rational DOORS is nothing but a requirement management tool that helps to capture and manage the requirements for large projects.

DXL was developed based on the C/C++ programming language. That’s why you would notice that the syntax of DXL is very similar to C/C++. However, there is no concept of the main() function in DXL. You do not need to write a mandatory main() function in DXL. Also, keeping a semicolon at the end of the statement is not mandatory in DXL. There is no concept of the pointer in DXL. This was done to make the DXL simpler.

Features of DXL Scripting:

  1. It is an interpreted language.
  2. DXL is very similar to the C programming language.
  3. It is procedural in nature.
  4. The pointer is not available in DXL.
  5. Manual garbage collection.

DXL scripting is mainly used for automating repetitive tasks in DOORS. It is an extension of the DOORS tool. Each and every GUI operation that you perform in DOORS via GUI can be automated via DXL scripting. With a decent knowledge of DXL scripting, you can even create a brand new tool with GUI that can be used as a customized tool to meet specific needs.

Is DXL interpreted or compiled?

Even though the syntax is similar to C/C++, DXL is an interpreted language. There is a DXL interpreter that interprets the DXL script line by line and executes the program.

So, the DXL interpreter is responsible to execute the DXL script.

DOORS DXL - Introduction » TheCloudStrap (2)

Hello World Program in DXL

Traditionally, we write the “Hello World” program as the first program, while learning any new programming language. In this section, let’s see, how to write and execute a simple hello world DXL script:

// www.TheCloudStrap.Com/************************************************************************* $FILENAME: d1.1.dxl* $DESCRIPTION: This is a sample DXL program.** NOTICE: Copyright www.TheCloudStrap.Com. All rights reserved.* Software comes without any warranties and guarantees, is provided * as is and is not supported. Use this software at your own risk. * Authors resume no liabilities.* * Contact: admin {at} TheCloudStrap.com************************************************************************/print "Hello World"

Now, let us look at the above code closely and explain how it works.

In DXL we use // for single line comment and /* */ for multiline comment. So, clearly, the commenting style is the same as C/C++. Line no-1 is a single-line comment which starts with //. Line No-3 is the starting of the multiline comment i.e. /* and ends at Line No-7 with */. Comments are in general used to make the code more readable and explain the algorithm. Comments are ignored by the DXL interpreter.

To print a string, you just need to use “print”. However, please note that it is not mandatory to put a semicolon at the end of the statement in DXL. However, you can put a semicolon at the end of the statement if you wish to. But, most experienced programmer tends to avoid the semicolon to differentiate the DXL script from C/C++ program.

Now, that we understand the above program, let us now see how to execute it.

How to execute the Hello World DXL Script?

To execute the program, you need to open your DOORS and navigate to: Tools -> Edit DXL. You will find the DXL Interaction window as shown below.

DOORS DXL - Introduction » TheCloudStrap (3)

You can type your script in the “DXL Input” pane (the upper half of the DXL Interaction Window) and then click on the “Run” button to execute the script. The output will be displayed in the “DXL output” pane (the bottom half of the DXL Interaction window).

Hello World Program Output

Now let’s run the program by clicking on the “Run” button and see the output. As you can see in the below image, the output is displayed in the “DXL output” pane.

DOORS DXL - Introduction » TheCloudStrap (4)

Print Function – String

So far, we have seen how to write/edit a simple DXL script and execute it. We have seen, how to display a string in the DXL output window using the print function.

In this section, let us understand the print function in depth.

Print is a function that is used to display a string or other native data variable in the DXL output window. It is optional to use the parentheses for print. You can either use print or print(). In general, you can avoid the parenthesis for zero or single argument function call.

So, you could write the code as:

// www.TheCloudStrap.Com/************************************************************************* $FILENAME: d1.2.dxl* $DESCRIPTION: This is a sample DXL program.** NOTICE: Copyright www.TheCloudStrap.Com. All rights reserved.* Software comes without any warranties and guarantees, is provided * as is and is not supported. Use this software at your own risk. * Authors resume no liabilities.* * Contact: admin {at} TheCloudStrap.com************************************************************************/print("Hello World")
DOORS DXL - Introduction » TheCloudStrap (5)

Notice that the print is used along with the parentheses. You can also add new line character or a tab character if you wish to:

// www.TheCloudStrap.Com/************************************************************************* $FILENAME: d1.3.dxl* $DESCRIPTION: This is a sample DXL program.** NOTICE: Copyright www.TheCloudStrap.Com. All rights reserved.* Software comes without any warranties and guarantees, is provided * as is and is not supported. Use this software at your own risk. * Authors resume no liabilities.* * Contact: admin {at} TheCloudStrap.com************************************************************************/print("\tHello World\n")

You will see the output as:

DOORS DXL - Introduction » TheCloudStrap (6)

You can clearly notice that the \t is used to put the tab character before Hello World.

Print Function – Other Data Types

So far, we have seen how to print a string using DXL scripting. Let us now look into an example that will print the value of other data type variables such as – int, real, bool, etc. Notice that I have intentionally put semicolons in some of the statements in Lines No-10, 11, 14, and 15.

But, normally whichever notation you are following, you need to be consistent in following that. If you do not wish to put a semicolon, do not use it anywhere in the program. You should always avoid mixing the style.

// www.TheCloudStrap.Com/************************************************************************* $FILENAME: d1.4.dxl* $DESCRIPTION: This is a sample DXL program.** NOTICE: Copyright www.TheCloudStrap.Com. All rights reserved.* Software comes without any warranties and guarantees, is provided * as is and is not supported. Use this software at your own risk. * Authors resume no liabilities.* * Contact: admin {at} TheCloudStrap.com************************************************************************/int i = 100real r = 200.58;bool b = true;string s = "Welcome to DXL!"print("i = " i "\n");print("r = " r "\n");print("b = " b "\n")print("s = " s "\n")
DOORS DXL - Introduction » TheCloudStrap (7)

In this example, I have mentioned integer, real, bool, and string-type variables. In the following article, we will look into these data types in detail.

Conclusion

This was the first part of the DOORS DXL tutorial. The intention of this article was to familiarize with DOORS DXL and show you how to edit and execute a simple program. Please comment below if you have any questions/suggestions.

DOORS DXL – Introduction

DOORS DXL - Introduction » TheCloudStrap (8)

Admin

This post was published by Admin.

Email: admin@TheCloudStrap.Com

Related posts:

  1. DOORS DXL – Basic data types
  2. DOORS DXL – Character
  3. DOORS DXL Array
  4. DOORS DXL Skip List
  5. DOORS DXL Items
  6. DOORS DXL File Operation
  7. DOORS DXL Dialog Box
  8. DOORS DXL Skip List Advanced
  9. 5+ Best Practices for DXL Scripting in IBM DOORS: Ensuring Efficiency and Maintainability
  10. Customizing IBM DOORS with DXL: Tailoring the Tool to Fit Your Organization’s Needs
DOORS DXL - Introduction » TheCloudStrap (2024)
Top Articles
Great Clips Radio Road
Christina Vignaud Age
Jack Doherty Lpsg
Dragon Age Inquisition War Table Operations and Missions Guide
Umbc Baseball Camp
Busted Newspaper Zapata Tx
Jazmen Jafar Linkedin
Ofw Pinoy Channel Su
Black Gelato Strain Allbud
THE 10 BEST River Retreats for 2024/2025
Strange World Showtimes Near Amc Braintree 10
Housing Intranet Unt
zopiclon | Apotheek.nl
Craigslist Pets Southern Md
454 Cu In Liters
Charmeck Arrest Inquiry
Craigslist Alabama Montgomery
Bestellung Ahrefs
OSRS Dryness Calculator - GEGCalculators
The Murdoch succession drama kicks off this week. Here's everything you need to know
Diesel Mechanic Jobs Near Me Hiring
Condogames Xyz Discord
How Much You Should Be Tipping For Beauty Services - American Beauty Institute
Candy Land Santa Ana
Indiana Wesleyan Transcripts
Craigslist Appomattox Va
Teacup Yorkie For Sale Up To $400 In South Carolina
Webcentral Cuny
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
The best firm mattress 2024, approved by sleep experts
Loslaten met de Sedona methode
Asteroid City Showtimes Near Violet Crown Charlottesville
104 Presidential Ct Lafayette La 70503
Restored Republic June 16 2023
Harrison County Wv Arrests This Week
Why comparing against exchange rates from Google is wrong
My Dog Ate A 5Mg Flexeril
FREE Houses! All You Have to Do Is Move Them. - CIRCA Old Houses
Σινεμά - Τι Ταινίες Παίζουν οι Κινηματογράφοι Σήμερα - Πρόγραμμα 2024 | iathens.gr
Troy Gamefarm Prices
Timberwolves Point Guard History
WorldAccount | Data Protection
Gun Mayhem Watchdocumentaries
Tedit Calamity
Fool's Paradise Showtimes Near Roxy Stadium 14
Cult Collectibles - True Crime, Cults, and Murderabilia
Benjamin Franklin - Printer, Junto, Experiments on Electricity
Hughie Francis Foley – Marinermath
House For Sale On Trulia
Oak Hill, Blue Owl Lead Record Finastra Private Credit Loan
Cryptoquote Solver For Today
Latest Posts
Article information

Author: Jonah Leffler

Last Updated:

Views: 6475

Rating: 4.4 / 5 (65 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Jonah Leffler

Birthday: 1997-10-27

Address: 8987 Kieth Ports, Luettgenland, CT 54657-9808

Phone: +2611128251586

Job: Mining Supervisor

Hobby: Worldbuilding, Electronics, Amateur radio, Skiing, Cycling, Jogging, Taxidermy

Introduction: My name is Jonah Leffler, I am a determined, faithful, outstanding, inexpensive, cheerful, determined, smiling person who loves writing and wants to share my knowledge and understanding with you.