Prev: Advantage Database Server 10 now available
Next: ReportPro 212 wants VO27*.DLL's in my VO28 ???
From: Mario Schulz on 2 Jun 2010 10:23 hi, is that 5333er safe ? method blabla.. local cstring as string TestFunction(@cString) return cstring Function TestFunction( cString ) cString := "Test" return is only an example about that what i mean... passing text or numeric variables with @ to function´s is that ok ? thanks for help.. bye, Mario
From: Alwin Nederpelt on 2 Jun 2010 16:47 On 2 jun, 16:23, Mario Schulz <i...(a)removethiswegenspamconcept-dv.de> wrote: > hi, > > is that 5333er safe ? > > method blabla.. > local cstring as string > TestFunction(@cString) > return cstring > > Function TestFunction( cString ) > cString := "Test" > return > > is only an example about that what i mean... passing text or numeric > variables with @ to function´s is that ok ? > > thanks for help.. > > bye, > Mario Function TestFunction( cString ref string) as void pascal cString := "Test" return or cString:=TestFunction() Function TestFunction() as string pascal local cString := "Test" as string return cString
From: Geoff Schaller on 2 Jun 2010 18:55 Mario. I am not sure what you are asking. You start by asking if a 5333 error is 'safe'. Well no it isn't because mostly, the application cannot continue. But there is nothing wrong with passing variables by reference to a function. This is a very standard part of VO and has nothing to do with 5333 errors per se. However you should strongly type all such functions - costs you nothing but gains you a lot. Geoff "Mario Schulz" <info(a)removethiswegenspamconcept-dv.de> wrote in message news:hu5ph1$87d$1(a)online.de: > hi, > > is that 5333er safe ? > > method blabla.. > local cstring as string > TestFunction(@cString) > return cstring > > Function TestFunction( cString ) > cString := "Test" > return > > > is only an example about that what i mean... passing text or numeric > variables with @ to function�s is that ok ? > > thanks for help.. > > bye, > Mario
From: Willie Moore on 2 Jun 2010 20:04 Geoff, I agree about strongly typing. Once you start strongly typing your methods and their parameters, you will get better code output from the compiler. It also has the side effect of preparing you for dotNet where everything is strongly typed <g>. Regards, Willie __________ Information from ESET NOD32 Antivirus, version of virus signature database 5167 (20100602) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
From: Geoff Schaller on 2 Jun 2010 23:05 <g> Well not everything. They have type object where you don't know what it is (think of it as type usual, which is not really typing at all). The other one is Array which again is an array of objects so everything has to be cast at some point. But yes, such practices will certainly better prepare you for Dot Net. Geoff "Willie Moore" <williem(a)wmconsulting.com> wrote in message news:hu6ria$6pp$1(a)speranza.aioe.org: > Geoff, > > I agree about strongly typing. Once you start strongly typing your > methods and their parameters, you will get better code output from the > compiler. It also has the side effect of preparing you for dotNet where > everything is strongly typed <g>. > > Regards, > Willie > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 5167 (20100602) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com
|
Pages: 1 Prev: Advantage Database Server 10 now available Next: ReportPro 212 wants VO27*.DLL's in my VO28 ??? |