Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"