Re: FormatBaseN Blowing up

2001-04-12 Thread Michael Dinowitz

FormatBaseN() will only work on an integer. Look at this article for more
info on it.
http://www.fusionauthority.com/alert/index.cfm?alertid=30#tech1
http://www.houseoffusion.com/hof/datatype.cfm


 Hi folks,

 Okay, off the thought ramble for a moment and on to something more
pressing
 and less theoretical.

 Yesterday our network admin updated one of the servers.  The hardware
 upgrade was necessary and the server needed cleaning.  The web server was
 changed from Netscape Enterprise server to IIS4.0 and the CF Server went
 from 4.0 to 4.5.1.  We thought we had all the problems ironed out, but
 apparently there's some interesting differences.

 The one I'm dealing with right now has to do with the FormatBaseN
funciton.
 Here's the code in question:

 !--- get the current system time ---
 cfset systime=#DateFormat(now(),"mmdd")# 
 #TimeFormat(now(),"hhmmss")#
 cfset systime_orig=systime

 !--- now scramble it up ---
 cfset length=len(systime)
 !---cfoutput#systime#br/cfoutput---
 cfloop index="i" from=1 to=#length#
 cfset ran1=RandRange(1,length)
 cfset ran2=RandRange(1,length)
 cfset token1=#mid(systime,ran1,1)#
 cfset token2=#mid(systime,ran2,1)#

 cfset systime=#removeChars(systime,ran1,1)#
 cfset systime=Replace(systime," ","","ALL")
 cfset systime=#Ljustify(systime,14)#
 cfset systime=#insert(token2,systime,ran1)#

 cfset systime=#removeChars(systime,ran2,1)#
 cfset systime=Replace(systime," ","","ALL")
 cfset systime=#Ljustify(systime,14)#
 cfset systime=#insert(token1,systime,ran2)#
 /cfloop
 cfset systime=Replace(systime," ","","ALL")
 cfoutput#systime# Len: #len(systime)#br
 #int(systime)# - #val(systime)# - #NumberFormat(systime)# -
 #IsNumeric(systime)#br
 #int(systime_orig)# - #val(systime_orig)# - #NumberFormat(systime_orig)# -
 #IsNumeric(systime_orig)#
 cfset base16_systime=#FormatBaseN(systime,16)#
 cfset base36_systime=#formatBaseN(systime_orig,36)#
 br
 #base16_systime# - #base36_systime#
 /cfoutput
 cfabort (This is here to stop further processing while I'm fixing it)

 On the Netscape server, the output is:
 20150031924110 Len: 14
 2.01500319241E+013 - 2.01500319241E+013 - 20,150,031,924,110 - YES
 2.00104121051E+013 - 2.00104121051E+013 - 20,010,412,105,139 - YES
 8b7ebb8e - 2my27n

 The IIS Server gets the following:
 11410401429203 Len: 14
 1.14104014292E+013 - 1.14104014292E+013 - 11,410,401,429,203 - YES
 2.00104121049E+013 - 2.00104121049E+013 - 20,010,412,104,932 - YES
 --
--
 
 Error Occurred While Processing Request
 Error Diagnostic Information

 An error occurred while evaluating the expression:

  base16_systime=#FormatBaseN(systime,16)#

 Error near line 56, column 7.
 --
--
 
 Parameter 1 of function FormatBaseN which is now "11410401429203" must be
an
 integer

 Any ideas or suggestions?

 TIA
 Hatton Humphrey



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: FormatBaseN Blowing up

2001-04-12 Thread C. Hatton Humphrey

But why would this work with CF Server 4.0 and not in 4.5?  There is no
change in the code or OS?

Thanks!
Hatton

 -Original Message-
 From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, April 12, 2001 11:36 AM
 To: CF-Talk
 Subject: Re: FormatBaseN Blowing up


 FormatBaseN() will only work on an integer. Look at this article for more
 info on it.
 http://www.fusionauthority.com/alert/index.cfm?alertid=30#tech1
 http://www.houseoffusion.com/hof/datatype.cfm


  Hi folks,
 
  Okay, off the thought ramble for a moment and on to something more
 pressing
  and less theoretical.
 
  Yesterday our network admin updated one of the servers.  The hardware
  upgrade was necessary and the server needed cleaning.  The web
 server was
  changed from Netscape Enterprise server to IIS4.0 and the CF Server went
  from 4.0 to 4.5.1.  We thought we had all the problems ironed out, but
  apparently there's some interesting differences.
 
  The one I'm dealing with right now has to do with the FormatBaseN
 funciton.
  Here's the code in question:
 
  !--- get the current system time ---
  cfset systime=#DateFormat(now(),"mmdd")# 
  #TimeFormat(now(),"hhmmss")#
  cfset systime_orig=systime
 
  !--- now scramble it up ---
  cfset length=len(systime)
  !---cfoutput#systime#br/cfoutput---
  cfloop index="i" from=1 to=#length#
  cfset ran1=RandRange(1,length)
  cfset ran2=RandRange(1,length)
  cfset token1=#mid(systime,ran1,1)#
  cfset token2=#mid(systime,ran2,1)#
 
  cfset systime=#removeChars(systime,ran1,1)#
  cfset systime=Replace(systime," ","","ALL")
  cfset systime=#Ljustify(systime,14)#
  cfset systime=#insert(token2,systime,ran1)#
 
  cfset systime=#removeChars(systime,ran2,1)#
  cfset systime=Replace(systime," ","","ALL")
  cfset systime=#Ljustify(systime,14)#
  cfset systime=#insert(token1,systime,ran2)#
  /cfloop
  cfset systime=Replace(systime," ","","ALL")
  cfoutput#systime# Len: #len(systime)#br
  #int(systime)# - #val(systime)# - #NumberFormat(systime)# -
  #IsNumeric(systime)#br
  #int(systime_orig)# - #val(systime_orig)# -
 #NumberFormat(systime_orig)# -
  #IsNumeric(systime_orig)#
  cfset base16_systime=#FormatBaseN(systime,16)#
  cfset base36_systime=#formatBaseN(systime_orig,36)#
  br
  #base16_systime# - #base36_systime#
  /cfoutput
  cfabort (This is here to stop further processing while I'm fixing it)
 
  On the Netscape server, the output is:
  20150031924110 Len: 14
  2.01500319241E+013 - 2.01500319241E+013 - 20,150,031,924,110 - YES
  2.00104121051E+013 - 2.00104121051E+013 - 20,010,412,105,139 - YES
  8b7ebb8e - 2my27n
 
  The IIS Server gets the following:
  11410401429203 Len: 14
  1.14104014292E+013 - 1.14104014292E+013 - 11,410,401,429,203 - YES
  2.00104121049E+013 - 2.00104121049E+013 - 20,010,412,104,932 - YES
 
 --
 --
  
  Error Occurred While Processing Request
  Error Diagnostic Information
 
  An error occurred while evaluating the expression:
 
   base16_systime=#FormatBaseN(systime,16)#
 
  Error near line 56, column 7.
 
 --
 --
  
  Parameter 1 of function FormatBaseN which is now
 "11410401429203" must be
 an
  integer
 
  Any ideas or suggestions?
 
  TIA
  Hatton Humphrey
 
 
 
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: FormatBaseN Blowing up

2001-04-12 Thread Steve Martin

I recall there being some change in the way ints are handled between the two
versions (4.0  4.5). I can't remember the specifics but your symptoms point
to that as being a likely suspect. Anyone who knows the details care to
elaborate?
Steve

 -Original Message-
 From: C. Hatton Humphrey [mailto:[EMAIL PROTECTED]]
 Sent: 12 April 2001 16:54
 To: CF-Talk
 Subject: RE: FormatBaseN Blowing up


 But why would this work with CF Server 4.0 and not in 4.5?  There is no
 change in the code or OS?

 Thanks!
 Hatton

  -Original Message-
  From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, April 12, 2001 11:36 AM
  To: CF-Talk
  Subject: Re: FormatBaseN Blowing up
 
 
  FormatBaseN() will only work on an integer. Look at this
 article for more
  info on it.
  http://www.fusionauthority.com/alert/index.cfm?alertid=30#tech1
  http://www.houseoffusion.com/hof/datatype.cfm
 
 
   Hi folks,
  
   Okay, off the thought ramble for a moment and on to something more
  pressing
   and less theoretical.
  
   Yesterday our network admin updated one of the servers.  The hardware
   upgrade was necessary and the server needed cleaning.  The web
  server was
   changed from Netscape Enterprise server to IIS4.0 and the CF
 Server went
   from 4.0 to 4.5.1.  We thought we had all the problems ironed out, but
   apparently there's some interesting differences.
  
   The one I'm dealing with right now has to do with the FormatBaseN
  funciton.
   Here's the code in question:
  
   !--- get the current system time ---
   cfset systime=#DateFormat(now(),"mmdd")# 
   #TimeFormat(now(),"hhmmss")#
   cfset systime_orig=systime
  
   !--- now scramble it up ---
   cfset length=len(systime)
   !---cfoutput#systime#br/cfoutput---
   cfloop index="i" from=1 to=#length#
   cfset ran1=RandRange(1,length)
   cfset ran2=RandRange(1,length)
   cfset token1=#mid(systime,ran1,1)#
   cfset token2=#mid(systime,ran2,1)#
  
   cfset systime=#removeChars(systime,ran1,1)#
   cfset systime=Replace(systime," ","","ALL")
   cfset systime=#Ljustify(systime,14)#
   cfset systime=#insert(token2,systime,ran1)#
  
   cfset systime=#removeChars(systime,ran2,1)#
   cfset systime=Replace(systime," ","","ALL")
   cfset systime=#Ljustify(systime,14)#
   cfset systime=#insert(token1,systime,ran2)#
   /cfloop
   cfset systime=Replace(systime," ","","ALL")
   cfoutput#systime# Len: #len(systime)#br
   #int(systime)# - #val(systime)# - #NumberFormat(systime)# -
   #IsNumeric(systime)#br
   #int(systime_orig)# - #val(systime_orig)# -
  #NumberFormat(systime_orig)# -
   #IsNumeric(systime_orig)#
   cfset base16_systime=#FormatBaseN(systime,16)#
   cfset base36_systime=#formatBaseN(systime_orig,36)#
   br
   #base16_systime# - #base36_systime#
   /cfoutput
   cfabort (This is here to stop further processing while I'm
 fixing it)
  
   On the Netscape server, the output is:
   20150031924110 Len: 14
   2.01500319241E+013 - 2.01500319241E+013 - 20,150,031,924,110 - YES
   2.00104121051E+013 - 2.00104121051E+013 - 20,010,412,105,139 - YES
   8b7ebb8e - 2my27n
  
   The IIS Server gets the following:
   11410401429203 Len: 14
   1.14104014292E+013 - 1.14104014292E+013 - 11,410,401,429,203 - YES
   2.00104121049E+013 - 2.00104121049E+013 - 20,010,412,104,932 - YES
  
 
 --
  --
   
   Error Occurred While Processing Request
   Error Diagnostic Information
  
   An error occurred while evaluating the expression:
  
base16_systime=#FormatBaseN(systime,16)#
  
   Error near line 56, column 7.
  
 
 --
  --
   
   Parameter 1 of function FormatBaseN which is now
  "11410401429203" must be
  an
   integer
  
   Any ideas or suggestions?
  
   TIA
   Hatton Humphrey
  
  
  
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: FormatBaseN Blowing up

2001-04-12 Thread David E. Crawford

There was a change in the way the parser handles things. Specifically the
"length" of an integer value.

DC

- Original Message -
From: "C. Hatton Humphrey" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Thursday, April 12, 2001 11:53
Subject: RE: FormatBaseN Blowing up


 But why would this work with CF Server 4.0 and not in 4.5?  There is no
 change in the code or OS?

 Thanks!
 Hatton

  -Original Message-
  From: Michael Dinowitz [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, April 12, 2001 11:36 AM
  To: CF-Talk
  Subject: Re: FormatBaseN Blowing up
 
 
  FormatBaseN() will only work on an integer. Look at this article for
more
  info on it.
  http://www.fusionauthority.com/alert/index.cfm?alertid=30#tech1
  http://www.houseoffusion.com/hof/datatype.cfm
 
 
   Hi folks,
  
   Okay, off the thought ramble for a moment and on to something more
  pressing
   and less theoretical.
  
   Yesterday our network admin updated one of the servers.  The hardware
   upgrade was necessary and the server needed cleaning.  The web
  server was
   changed from Netscape Enterprise server to IIS4.0 and the CF Server
went
   from 4.0 to 4.5.1.  We thought we had all the problems ironed out, but
   apparently there's some interesting differences.
  
   The one I'm dealing with right now has to do with the FormatBaseN
  funciton.
   Here's the code in question:
  
   !--- get the current system time ---
   cfset systime=#DateFormat(now(),"mmdd")# 
   #TimeFormat(now(),"hhmmss")#
   cfset systime_orig=systime
  
   !--- now scramble it up ---
   cfset length=len(systime)
   !---cfoutput#systime#br/cfoutput---
   cfloop index="i" from=1 to=#length#
   cfset ran1=RandRange(1,length)
   cfset ran2=RandRange(1,length)
   cfset token1=#mid(systime,ran1,1)#
   cfset token2=#mid(systime,ran2,1)#
  
   cfset systime=#removeChars(systime,ran1,1)#
   cfset systime=Replace(systime," ","","ALL")
   cfset systime=#Ljustify(systime,14)#
   cfset systime=#insert(token2,systime,ran1)#
  
   cfset systime=#removeChars(systime,ran2,1)#
   cfset systime=Replace(systime," ","","ALL")
   cfset systime=#Ljustify(systime,14)#
   cfset systime=#insert(token1,systime,ran2)#
   /cfloop
   cfset systime=Replace(systime," ","","ALL")
   cfoutput#systime# Len: #len(systime)#br
   #int(systime)# - #val(systime)# - #NumberFormat(systime)# -
   #IsNumeric(systime)#br
   #int(systime_orig)# - #val(systime_orig)# -
  #NumberFormat(systime_orig)# -
   #IsNumeric(systime_orig)#
   cfset base16_systime=#FormatBaseN(systime,16)#
   cfset base36_systime=#formatBaseN(systime_orig,36)#
   br
   #base16_systime# - #base36_systime#
   /cfoutput
   cfabort (This is here to stop further processing while I'm fixing
it)
  
   On the Netscape server, the output is:
   20150031924110 Len: 14
   2.01500319241E+013 - 2.01500319241E+013 - 20,150,031,924,110 - YES
   2.00104121051E+013 - 2.00104121051E+013 - 20,010,412,105,139 - YES
   8b7ebb8e - 2my27n
  
   The IIS Server gets the following:
   11410401429203 Len: 14
   1.14104014292E+013 - 1.14104014292E+013 - 11,410,401,429,203 - YES
   2.00104121049E+013 - 2.00104121049E+013 - 20,010,412,104,932 - YES
  

 --
  --
   
   Error Occurred While Processing Request
   Error Diagnostic Information
  
   An error occurred while evaluating the expression:
  
base16_systime=#FormatBaseN(systime,16)#
  
   Error near line 56, column 7.
  

 --
  --
   
   Parameter 1 of function FormatBaseN which is now
  "11410401429203" must be
  an
   integer
  
   Any ideas or suggestions?
  
   TIA
   Hatton Humphrey
  
  
  

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists