Recent

Author Topic: Problems with StrToDWord  (Read 2185 times)

simsee

  • Full Member
  • ***
  • Posts: 183
Problems with StrToDWord
« on: March 30, 2017, 01:17:46 pm »
I apologize for the trivial question... I have some problems with StrToDWord function...

To show the issue I simplify my context with the following toy program:

Code: Pascal  [Select][+][-]
  1. program Project1;
  2. uses SysUtils;
  3. var
  4.   aDWordStr : string;
  5. begin
  6.   aDWordStr:='10000';
  7.   Writeln(StrToInt(aDWordStr));
  8.   Writeln(StrToDWord(aDWordStr));
  9. end.  

Compiler return "project1.lpr(8,11) Error: Identifier not found "StrToDWord"...

Why?

Zoran

  • Hero Member
  • *****
  • Posts: 1824
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Problems with StrToDWord
« Reply #1 on: March 30, 2017, 01:52:13 pm »
You do not have Sysutils in uses section?
According to documentation it is in Sysutils: http://www.freepascal.org/docs-html/current/rtl/sysutils/strtodword.html

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Problems with StrToDWord
« Reply #2 on: March 30, 2017, 02:01:19 pm »
No, it is there. Maybe fpc.cfg is broken?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11351
  • FPC developer.
Re: Problems with StrToDWord
« Reply #3 on: March 30, 2017, 02:08:24 pm »
Works for me 3.0.2 and 3.1.1 on Windows, so a bit more information would be informative.

Still with sysutils being in the RTL and the error indicating it got past the uses clause, this is weird.

simsee

  • Full Member
  • ***
  • Posts: 183
Re: Problems with StrToDWord
« Reply #4 on: March 30, 2017, 02:56:48 pm »
I compiled the code in my laptop and the problem don't arise... Thus my installation on workstation is corrupted... I did not imagine that, since I compiled many complex sources without problems in the last days... Sorry for the time I made you lose... Thanks!

 

TinyPortal © 2005-2018