Solved

Help Variable's

Posted on 2001-07-18
11
117 Views
Last Modified: 2010-04-06
Example:
I have the following thing:
c1: = 'data';
c2: = 'data';
c3: = 'data';
c4: = 'data';
c5: = 'data';

that routine I can use to concatenate these fields within a for or while. s1: = s1 + c?

Greetings Ruben  
0
Comment
Question by:rbarzallo
  • 4
  • 2
  • 2
  • +2
11 Comments
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 10 total points
ID: 6295378
As in most other programming languages you cannot iterate over separate variables.

do something like

var
  C: array [1..5] of string;
  I: Integer;
  S: string;
begin
  C[1] := 'data1';
  C[2] := 'data2';
  C[3] := 'data3';
  C[4] := 'data4';
  C[5] := 'data5';
  S := '';
  for I := Low(C) to High(C) do
    S := S + C[I];
end;
0
 
LVL 4

Expert Comment

by:YodaMage
ID: 6295733
You have to use a pointer "^" in order to achieve this.
0
 

Author Comment

by:rbarzallo
ID: 6295976
ok,
entonces no puedo realizar como en visual basic :

  s1 := s1 + c&number


ruben
0
 

Author Comment

by:rbarzallo
ID: 6295978
ok,
then I cannot make like in visual BASIC:
     s1: = s1 + c&number  

Ruben
0
 
LVL 4

Expert Comment

by:YodaMage
ID: 6295998
Nope
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rbarzallo
ID: 6296043
by I complete,
c1: = 'data';

 Assuming this:
s2: = ' c1 ';
s1: = like knowing the content of c1 if this within s2??????  
Ruben
0
 

Author Comment

by:rbarzallo
ID: 6296047
that it means "nope"?  
 
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6296874
yodaMage, even using pointers may not york.
Nothing hinders the compiler to use a register for some of the variables.
0
 
LVL 2

Expert Comment

by:Felixin
ID: 6298209
Nope = no

Simplemente no puedes hacerlo porque el Delphi es un lenguaje estructurado que no esta pensado para eso. Lo que te plantean son alternativas: utilizar punteros, poner las variables en arrays.

Tanslation:

Nope=no (that was obvious ;-))

Simply you cannot make it because Delphi is a structurec languaje non thought for that. What they are giving to you are work arrounds: pointers, put the variables in arrays ...

Think that in Basic you can do many things that you can't in structured languajes. That's because you can mess up Basic code so easily if you're not very organized.

0
 
LVL 26

Expert Comment

by:Russell Libby
ID: 8703560
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept robert_marquardt's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Display a PDF file and get words from it 6 96
Master Detail with TADODataset 4 97
Thread safe  opinion 7 111
Convert Jpg /PNG To GIF 5 103
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now