Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!news.mb-net.net!open-news-network.org!.POSTED.229.225.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: VB6/VBA array to JavaScript array Date: Fri, 29 Sep 2017 19:08:30 +0200 Organization: PointedEars Software (PES) Lines: 64 Message-ID: <3783597.mogB4TqSGs@PointedEars.de> References: <639d22ec-869c-482d-bd1c-4272dfb27b8c@googlegroups.com> <753cd5a0-573d-4e27-b312-60e63c209495@googlegroups.com> <2518556.88bMQJbFj6@PointedEars.de> <69ab8c0b-fc31-4bd6-9b73-b67a78fa666e@googlegroups.com> <4192671.rnE6jSC6OK@PointedEars.de> <1cbeb3c9-c9a5-4e66-8493-686235eccd5c@googlegroups.com> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit Injection-Info: gwaiyur.mb-net.net; posting-host="229.225.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch:178.197.225.229"; logging-data="22437"; mail-complaints-to="abuse@open-news-network.org" User-Agent: KNode/4.14.2 X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. On Friday, 29 September 2017 16:15:05 UTC+1, Thomas 'PointedEars' Lahn > wrote: >> Learn to quote. >> For this to have a chance to work, you need to have something like >> >> var UDF = …; >> >> in your JScript code *before* you refer to the identifier “UDF”. The >> code that you posted does not contain such a line, so for that alone it >> is hard to make even an educated guess what might have gone wrong here. > > This is not the problem. Talk is cheap. Show me the code. –Linus Torvalds > UDF is a global variable in my VB6 code and that > works fine. Global variables in your *VB6* code are _not_ automatically available/the same in your *JScript* code. > This JS function for example works perfectly fine: That does not mean anything. > function JS_GetAge(lParamCount, strParam1, lParam2, dParam3) > > { > > lDOB = UDF.GetInt32(1); This method call would work, for example, if your *JScript* code contained the global variable declaration and initialization var UDF = { GetInt32: function (x) { return x >>> 0; } }; before, but any other method call would still not work. > if (lDOB == 0) { > return -1; > } > > var jDOB = new Date((lDOB - 25569) * 86400000); Not a good idea. Consider DST. > […] > } -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.