<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#fefef3>
<DIV><STRONG><FONT face=Arial color=#000080 size=4>To change a string to a
number, I use this:</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4>foo = foo -
0;</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4></FONT></STRONG> </DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4>HTH Tim in
Ireland.</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4>PS What on earth does your
subject line mean ?</FONT></STRONG></DIV>
<DIV><STRONG><FONT face=Arial color=#000080 size=4></FONT></STRONG> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=listuser@wjponline.com href="mailto:listuser@wjponline.com">J.R.
Pitts</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:javascript@LaTech.edu">javascript@LaTech.edu</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> 28 June 2003 04:34</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] type
casting...</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=286252903-28062003><FONT face=Arial size=2>I don't usually do
javascript, but every now and then....</FONT></SPAN></DIV>
<DIV><SPAN class=286252903-28062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=286252903-28062003><FONT face=Arial size=2>I am doing some
time math. I use the following statement to convert a time string (ie...15:30)
to a total number of minutes (ie..930)</FONT></SPAN></DIV>
<DIV><SPAN class=286252903-28062003><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=286252903-28062003>
<P><FONT face=Arial size=2> endMinutes=endTime.substring(0,2)*60 +
endTime.substring(3,5)*1<BR></FONT></P>
<P><FONT size=+0><SPAN class=286252903-28062003><FONT face=Arial size=2>I have
to use the ending "*1" to cast the the ending string to a number, so that I
get '930' instead of a string concatenation (90030)</FONT></SPAN></FONT></P>
<P><FONT size=+0><SPAN class=286252903-28062003><FONT face=Arial
size=2></FONT></SPAN></FONT> </P>
<P><FONT size=+0><SPAN class=286252903-28062003><FONT face=Arial size=2>Works
fine, but what is the proper javascript way to do
this?</FONT></SPAN></FONT></P>
<P><FONT size=+0><SPAN class=286252903-28062003><FONT face=Arial
size=2>Thanks,</FONT></SPAN></FONT></P>
<P><FONT size=+0><SPAN class=286252903-28062003><FONT face=Arial
size=2>J.R.</FONT></SPAN></P></FONT></SPAN></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Javascript mailing
list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></BLOCKQUOTE></BODY></HTML>