Link to home
Start Free TrialLog in
Avatar of m_renaud
m_renaud

asked on

Newbies questions part1.

Hi Expert,

Q1: Why some people places a "exit sub" when there's no error management... is it faster?
ex.: private sub BilyBob()
           <instructions>
           exit sub <----
      end sub

Q2: what means "&Hxx"
ex.: Const KEY_SET_VALUE = &H2 or Const SWP_HIDEWINDOW = &H80 or Const TOTO = &0, etc.

Q3:...
Dim lTest as Long
lTest& = Clng(number)  -> why the "&" after the variable?

thks for all...

Mart

ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
1) no it is no faster and some people will argue it is bad practise

2)&Hxx is a xex value

3)lTest& is a shortcut way of saying the variable is a long like
dim l& would be typed as long
Avatar of Mike McCracken
Mike McCracken

Q1 - Exit sub

Could be several things.  
Personal preference, habit, or the way they were trained
Error handling code has been removed
Coding standard

Q2 - &Hxx
VB - & declares the value as a LONG
C - &H - Hex number

Q3 - & after
VB - Declares it as a long.

mlmcc
Avatar of m_renaud

ASKER

Hi TimCottee,

it was 3 littles questions... i did not believe them enough important to make three questions...
next time i'll pay attention...

thks for answers

Mart.