User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 391,775 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,437 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
Views: 5505 | Replies: 1
Reply
Join Date: Jan 2005
Posts: 2
Reputation: Holland is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Holland Holland is offline Offline
Newbie Poster

Dev Pascal help!

  #1  
Jan 3rd, 2005
Alrighty, I have two questions to ask:

1. Is there a length function in Dev Pascal ? If so, what is it? If not, is there a way to achieve the length of a string?

2. Can you change a string into an integer and/or vice versa. (example: entering '123' as a string and turning it into the number 123.)


Any assistance would be greatly appreciated. Thank you in advance.



Cheers,


Shane
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2005
Posts: 31
Reputation: Jackrabbit is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
Jackrabbit Jackrabbit is offline Offline
Light Poster

Re: Dev Pascal help!

  #2  
Jan 12th, 2005
1. Is there a length function in Dev Pascal ? If so, what is it? If not, is there a way to achieve the length of a string?

Dev Pascal uses either the Free Pascal compiler or the GNU Pascal compiler.

Online documentation for FPC System unit:

length: Length returns the length of the string S , which is limited to 255 for shortstrings. If the strings S is empty, 0 is returned. Note: The length of the string S is stored in S[0] for shortstrings only. The Length fuction should always be used on ansistrings and widestrings.


2. Can you change a string into an integer and/or vice versa. (example: entering '123' as a string and turning it into the number 123.)

StrToInt( S : String ): StrToInt will convert the string S to an integer. If the string contains invalid characters or has an invalid format, then an EConvertError is raised.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Pascal and Delphi Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Pascal and Delphi Forum

All times are GMT -4. The time now is 4:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC