out of curiosity I had a look at what happens when you access an array just by using its name with no index []
and pbp addresses the first var in the array as the type of var specified in the array declaration .
I would not recommend the practice though
Code:
****************************************************************
'* Name : UNTITLED.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2014 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 7/2/2014 *
'* Version : 1.0 *
'* Notes : 16f1825 *
'* : *
'****************************************************************
#CONFIG
__config _CONFIG1, _WDTE_ON & _FOSC_INTOSC &_MCLRE_ON &_PWRTE_ON
__config _CONFIG2, _LVP_OFF
#ENDCONFIG
DEFINE OSC 32
osccon=$70 '32 mhz
anselA=0 'dig i/o
ANSELC=0
TRISA= %11111110
APFCON0.7=0
so var porta.0
so=1
pause 4000
myarry var word[8]
myarry[0]=$ffff
myarry[1]=$ffff
serout2 so,84,[ "ready ",13,10]
main:
pause 4000
serout2 so,84,[ #myarry[0]," ",#myarry[1],13,10]
myarry=0
serout2 so,84,[ #myarry[0]," ",#myarry[1],13,10]
goto main
result
ready
65535 65535
0 65535
Bookmarks