* * *

Author Topic: Problems with StrToDWord  (Read 449 times)

simsee

  • New member
  • *
  • Posts: 37
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: 1148
    • 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: 3667
Re: Problems with StrToDWord
« Reply #2 on: March 30, 2017, 02:01:19 pm »
No, it is there. Maybe fpc.cfg is broken?
Lazarus trunk / fpc 3.0.0 / Win32

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5575
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

  • New member
  • *
  • Posts: 37
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!

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus