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

  • SEARCH
  • Home
  • 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 8276829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:29:57+00:00 2026-06-08T08:29:57+00:00

AS. Nevermind. Had wrong gut feeling about continue on while/repeat loops. Made fool of

  • 0

AS. Nevermind. Had wrong gut feeling about continue on while/repeat loops. Made fool of myself 🙂

See the commented line.
If i uncomment it – compilation goes okay.
If i keep it commented, then warning is given about undefined result.
It seems compiler fails to account for pseudo-procedures like Break and Continue.

Is it happenning with prior Delphi versions ?
Is there QC for it ?

//returns 0 or win32 error code
function TfmMain.callQDN(DeviceName: string;
  out buff: string): DWORD;
const len_step = 8192;
var res, len, err: DWORD;
    lpDeviceName: PChar;
begin
  SetLength(buff, len_step);
  len := Length(buff);

  lpDeviceName := nil;
  if DeviceName>'' then lpDeviceName := @DeviceName[1];

  repeat
    Res := QueryDosDevice(lpDeviceName, @buff[1], len);

    if Res = 0 then begin
       err := GetLastError;
//       Result := err;

       if err = ERROR_INSUFFICIENT_BUFFER then begin
          len := len_step + len;
          SetLength(buff, len);
          continue;
       end;

       Result := err;
    end else begin
       Result := 0;
       SetLength(buff, res); // res+1 ?
    end;

  until (Result = 0);

end;
  • 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-06-08T08:30:00+00:00Added an answer on June 8, 2026 at 8:30 am

    I’m stupid.

    Continue re-checks the condition, not just starts the loop body again

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

Sidebar

Related Questions

-edit- nevermind, i made a mistake in my select statement. Update was working correctly.
So, I had a question about getting word count to work properly in emacs
Nevermind, I just figured out that CakePHP had to re-set the cookie because it
I've been thinking about this problem for a while and have yet to come
**Nevermind. I figured it out. ** I did it like this: $(#accordion).accordion({ header:'h3', active:
** EDIT ** Nevermind, just needed to take out the parens... I get this
-edit- nevermind. I ran the code again and it appears i cant log into
I've describef properties of my objects (nevermind what the object is) in styles.xml. I
let say i have a string like this neverMind<b>What is up</b>neverMind and I want
( This question , though similar, didn't really answer my question.) I've had problems

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.