[Javascript] Variant and typeof()

Rodney Myers rmyers at i-way.co.uk
Thu May 3 16:04:18 CDT 2001


Carlos,

Have you now modifed this function

function Load(FileName) {
var BinFile, BinData;
...

because as that stands BinData is private within the function, which has no
return value.

And, even if there is a global var BinData this function will not change its
value - as P-PK explained.

hth

Rodney

Carlos wrote:

> Well, for the problem of converting the variant type (returned by
> Stream.Read() function) to a string, I got another question...
> According to the Language Reference I own, the function typeof() returns the
> type of an argument, I mean, if you pass a string as an argument it returns
> 'string', but if I pass the variable, which stores the value returned by the
> Stream.Read() function, it displays 'unknown'...funny...Javascript can not
> determine the type of this data...
>
> As many of you suggested, I forced this variant data to a string with:
> var BD = 'Text: ' + BinData;
>
> But nothing, when BD is displayed, is only the string 'Text: ', and for
> more, its length is 6, so the concatenation didn't take place...
> Any solution to this??
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript

--
Shop at ssistant Add-ons and Developer Workshops
http://www.aflyingstart.net/addons/

Enquiries regarding Shop at ssistant Classic training :
Call 01256 880770

Rodney Myers
Based in Oxford, England
Technical Director, Shop at ssistant eCommerce Solutions






More information about the Javascript mailing list