![]() |
Chr and Chr$
Hi all,
What is the difference between the Chr and Chr$ and all other similar pairs? Clara -- thank you so much for your help |
Chr and Chr$
chr or mid or left or... are functions that take variants as arguments.
Variants are inefficient as the function first needs to determine what kind of varaible it is. By using the dollar sign you are telling the function that you are passing in a string. This makes the functions more efficient. The down side is that if you pass in somthing other than a string the function will bomb... -- HTH... Jim Thomlinson "clara" wrote: Hi all, What is the difference between the Chr and Chr$ and all other similar pairs? Clara -- thank you so much for your help |
Chr and Chr$
Hello Clara
see here with Dick: http://www.dailydoseofexcel.com/arch...on-efficiency/ -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "Jim Thomlinson" wrote: chr or mid or left or... are functions that take variants as arguments. Variants are inefficient as the function first needs to determine what kind of varaible it is. By using the dollar sign you are telling the function that you are passing in a string. This makes the functions more efficient. The down side is that if you pass in somthing other than a string the function will bomb... -- HTH... Jim Thomlinson "clara" wrote: Hi all, What is the difference between the Chr and Chr$ and all other similar pairs? Clara -- thank you so much for your help |
Chr and Chr$
I was unaware of the difference so I read further. I think you got it mixed
up. The args are not variants; the returned values are Variant (no $) or String ($) "Jim Thomlinson" wrote: chr or mid or left or... are functions that take variants as arguments. Variants are inefficient as the function first needs to determine what kind of varaible it is. By using the dollar sign you are telling the function that you are passing in a string. This makes the functions more efficient. The down side is that if you pass in somthing other than a string the function will bomb... -- HTH... Jim Thomlinson "clara" wrote: Hi all, What is the difference between the Chr and Chr$ and all other similar pairs? Clara -- thank you so much for your help |
All times are GMT +1. The time now is 06:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com