Page 1 of 1 1
Topic Options
#15554 - 2001-12-27 10:03 AM Calling functions
Mark Pietersz Offline
Getting the hang of it

Registered: 2001-09-30
Posts: 74
Loc: Melbourne, Australia
Folks,

The following line of code just 'stopped working' and I can't figure out why

$sDefaultPrinter = sGetDefaultPrinter($sNTMode)

Instead of calling the function it assigns the value "sGetDefaultPrinter" to the variable

Using KiXtart 4

TIA

Mark Pietersz

_________________________
Mark Pietersz

Top
#15555 - 2001-12-27 02:05 PM Re: Calling functions
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Mark,

hmm ... it depends :

If you have placed the function in the same script it should work (if yes , just post the function and we'll see)

If you have the function in a seperate file (.udf) you will have to call it first like:

code:

call "[path\]filename.ext"


KiX 4 will then evaluate the included function(s) and be able to use it afterwards in the script (plus subscripts) ... say the current session !

hth

Jochen

_________________________



Top
#15556 - 2001-12-28 09:29 AM Re: Calling functions
Mark Pietersz Offline
Getting the hang of it

Registered: 2001-09-30
Posts: 74
Loc: Melbourne, Australia
Jochen,

Unfortunately the function is in the same script - I think I'm going blind trying to spot the error. I'll have another look at it and post code if I'm still without a resolution

Mark

_________________________
Mark Pietersz

Top
#15557 - 2001-12-28 10:14 AM Re: Calling functions
Mark Pietersz Offline
Getting the hang of it

Registered: 2001-09-30
Posts: 74
Loc: Melbourne, Australia
Jochen

I found the error - further down in the code I had some like copy thisfile" "thatfile"

Notice that I left OFF the leading double quote on the first parameter to the copy command. This caused all my functions to fail with this peculiar behaviour.

Rgds

Mark

_________________________
Mark Pietersz

Top
#15558 - 2001-12-31 05:58 AM Re: Calling functions
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

To verify f.e. quotations problem use our tool kix400strip.exe,
which you can find on our site.
greetings.


btw: symbol on our homepage has been linked to related http://kixtart.org topic.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.058 seconds in which 0.03 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org