Delphi 2010 - I have a routine that takes a string and processes it. There are 3 different types of processing, and I may need any combination, including all three processing methods. I am trying to determine what to name my routine, but everything I try causes problems. What I want to do is call a procedure like this ...
StringProcess(StartString1, VarProcess1, VarProcess2, VarProcess3);
but it would be just as easy, I want only 2 processes
StringProcess(StartString1, '', VarProcess2, VarProcess3);
A procedure definition is something like
procedure StringProcess(StartString: string; var S1:String; var S2:string; var S3:string);
So, in a nutshell ... How do I define my procedure for returning between 1 and 3 VAR variables? Delphi wants me to always go through 3 variables, and I just need to ignore one if I don't need it. Is there a way to pass "non-existent" VAR parameters and just ignore them as needed?
thank