Delphi

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingDelphi

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old May 23rd, 2008, 08:37 AM
hannesbez hannesbez is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2008
Location: Johannesburg
Posts: 9 hannesbez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 13 sec
Reputation Power: 0
Send a message via Skype to hannesbez
Format method in Delphi

Will appreciate advise on this:
I need to call a procedure like

procedure MySort(Ext : string);

Ext may be, for example, 'Name' or 'Surname'. I then want to use Ext to build for example

MyArray[j].Name if the paramer Ext equals 'Name'.

I suspect one must use format to do do so, something like

format('MyArray[j].%s', [Ext]) but this turns the whole thing into a string!

Reply With Quote
  #2  
Old May 23rd, 2008, 09:52 AM
UseShots UseShots is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: May 2008
Posts: 11 UseShots User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 36 m 22 sec
Reputation Power: 0
Pascal is not a dynamic language. It just won't work this way.
You should know the names at compile time. (There are some tricks with published properties although)

Reply With Quote
  #3  
Old July 14th, 2008, 02:59 AM
Taborri Taborri is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jul 2008
Posts: 6 Taborri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 40 m 29 sec
Reputation Power: 0
I think this site will be help u .delphibasics.co.uk there are list of format method are available. try it.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingDelphi > Format method in Delphi


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap