Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 513041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:22:53+00:00 2026-05-13T07:22:53+00:00

As said in the book Microsoft Dynamics AX 2009 Programming: Getting Started it´s needed

  • 0

As said in the book Microsoft Dynamics AX 2009 Programming: Getting Started it´s needed to put semicolons after declarations in x++:

The extra semicolon after the variable
declaration is mandatory as long as
the first line of code is not a
keyword. The semicolon tells the
compiler that variable declarations
have come to an end. You cannot
declare new variables after this
semicolon.

(copied directly from the book, unchanged, if needed I’ll remove it)

However, when I remove the semicolon and run the job, there’s absolutely no error or problem:

static void Job1(Args _args)
{
    str string1 = "STACKOVERFLOW";
    ;
    print string1;
    pause;
}

works just as

static void Job2(Args _args)
{
     str string1 = "STACKOVERFLOW";

     print string1;
     pause;
}

Is it really needed? Should I get used to using it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:22:54+00:00Added an answer on May 13, 2026 at 7:22 am

    It’s explained rather elegantly here.

    A key quote [emphasis mine]:

    "The reason you need that extra semicolon is because the compiler can’t always see where the variable declarations end. If you don’t help a little, it will make a guess. And it’s not very good at guessing."

    While the compiler is analyzing the code it checks if the first word on a line matches the name of a type (AOT object). If it’s a type name the compiler treats the line as a variable declaration. In this case a variable name should be next.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 252k
  • Answers 252k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check the HasPassword property. May 13, 2026 at 9:42 am
  • Editorial Team
    Editorial Team added an answer It turns out the solution is really simple: .yui-dt table… May 13, 2026 at 9:42 am
  • Editorial Team
    Editorial Team added an answer SELECT Orders.OrderNumber, LineItems.Quantity, LineItems.Description FROM Orders JOIN LineItems ON LineItems.LineItemGUID… May 13, 2026 at 9:42 am

Related Questions

WCF is Microsoft's replacement for .Net Remoting and Web services. It's critical to understand
From .NET Rocks! Show #488 : Richard Campbell: In the GDI world we got
I'm trying to overload the assignment operator and would like to clear a few
I'm creating a Custom tag in my web.config. I first wrote the following entry
I'm a little confused as to what's going on, i'm playing with some programs

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.