Trying to use typed variables to assign data to the structure and retrieve the elements for conversion. The structure is a word and variable is defined as a word but the complier errors them as different types, why?
Can't I assign a variable to a typed variable if they are the same length?
#COMPILE EXE
#DIM ALL
TYPE test 'this is the structure for api call
' (FileTimeToDosDateTime)
Day AS BIT * 5 IN WORD
Month AS BIT * 4
year AS BIT * 7
END TYPE
FUNCTION PBMAIN () AS LONG
DIM variable AS WORD
DIM structure AS test
structure = variable - error Data type mismatch
END FUNCTION
Can't I assign a variable to a typed variable if they are the same length?
#COMPILE EXE
#DIM ALL
TYPE test 'this is the structure for api call
' (FileTimeToDosDateTime)
Day AS BIT * 5 IN WORD
Month AS BIT * 4
year AS BIT * 7
END TYPE
FUNCTION PBMAIN () AS LONG
DIM variable AS WORD
DIM structure AS test
structure = variable - error Data type mismatch
END FUNCTION
Comment