I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi Object PASCAL Topic   Print This     

Arrays of char

Arrays of char in Delphi Object PASCAL topic (part of our Pascal and Delphi Coding group).

Quick Search: Arrays of   Arrays of char  
dibefog
italy
example: 'ciao'

it is possible?!? :

array[1]:='c';
array[2]:='i';
array[3]:='a';
array[4]:='o';

-----------------------------------

there is a function that get the seconds from the start of pc?

sorry but i don't know english very well!!!!!
help me!!! I I
 Posted 16 years ago (Thread Starter)
Comment Quote
About dibefog -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9189, 6 replies
Thread Started 3/6/2003 1:26:00 AM
View Counter=2803
Last Reply Posted 3/7/2003 2:29:00 AM)
Location=italy  
Joined=17 years ago   MB Posts=9  
Angel
 (Inactive)
England
Im not quite sure what you mean but this is how you would create the array of characters.

var
A : Array[1..4] of Char;
begin
A[1] := 'C';
A[2] := 'i';
A[3] := 'a';
A[4] := 'o';
end;
 Posted 16 years ago
Comment Quote
About Angel -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9190 (Level 1.1)  Reply to 9189
Thread Started 3/6/2003 2:18:00 AM
View Counter=2
Location=England  
Joined=18 years ago   MB Posts=199  
dibefog
italy
but can i trasform the word "ciao" into this array:

a[1]:='c';
a[2]:='i';
a[3]:='a';
a[4]:='o';

with a program?
 Posted 16 years ago (Thread Starter)
Comment Quote
About dibefog -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9196 (Level 1.2)  Reply to 9189
Reply Posted 3/6/2003 5:08:00 AM
Location=italy  
Joined=17 years ago   MB Posts=9  
dibefog
italy
Thanks!!!

do you remember the function that count the seconds from the boot of the computer??
 Posted 16 years ago (Thread Starter)
Comment Quote
About dibefog -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9204 (Level 1.3)  Reply to 9189
Reply Posted 3/6/2003 10:49:00 AM
Location=italy  
Joined=17 years ago   MB Posts=9  
Most Recent Post
dibefog
italy
thank you but i found it! Big Grin! Big Grin!
the function is: " gettickcount "
it count the milliseconds from the boot of windows.
thank you for the help!!!
 Posted 16 years ago (Thread Starter)
Comment Quote
About dibefog -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9212 (Level 1.4)  Reply to 9189
Reply Posted 3/7/2003 2:29:00 AM
Location=italy  
Joined=17 years ago   MB Posts=9  
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
Yes:

uses
SysUtils;

var
arrayCh : array [1..4] of char;
myString : string;
begin
myString := 'ciao';
StrPCopy(arrayCh,myString);
end;
Or, if you don't know the length of characters in the string, and want to make sure that you don't copy past the array bounds of the character array:

StrPLCopy(arrayCh,myString,4);

Now that
 Posted 16 years ago
Comment Quote
About Scott Wehrly -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9197 (Level 1.5)  Reply to 9189
Reply Posted 3/6/2003 5:45:00 AM
Location=Las Vegas, NV USA 
Joined=17 years ago   MB Posts=442   KB Posts=19  
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
(We sure need an Indiana Jones graemlin for those times when I conduct an expedition into the bowels of the VCL...)



buona fortuna, dibefog!



There are two functions:


  • timeGetTime and
  • timeGetSystemTime



Both of these functions are in the unit file MMSystem.pas. Just add that to your uses clause.


The documentation on these two functions is in the Win32 Developer's Reference help manual that comes with the Delphi help.



For runtime purposes, the functionality is in the file winmm.dll, which is part of the Windows system files.



The first function, timeGetTime, returns a double word that is compatible with the data type of a TDateTime. The second function, which I think is more useable, works with a PMMTime record type, which includes fields for the hours, minutes, and seconds of the time interval.



IHTH Geek Alert!
 Posted 16 years ago
Comment Quote
About Scott Wehrly -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9206 (Level 1.6)  Reply to 9189
Reply Posted 3/6/2003 11:39:00 AM
Location=Las Vegas, NV USA 
Joined=17 years ago   MB Posts=442   KB Posts=19  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1151A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #9189 Counter
2803
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2019 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech