Please help )
Any directives to switch off optimization?
const's and func1() eliminated if no direct access to it.
I want access indirect to const's and func's
How organize const's to array or other structure?
const menu123 as item_t[2]=(menu,menu1)
Didn't work
Code: Select all
program Pointers
' Declarations section
typedef func_t as sub procedure
DIM aa as BYTE volatile
Sub Procedure func1()
aa=0
End Sub
dim MyPtr as ^func_t
structure item_t
dim name as char[4]
dim mm as word
dim func as word
end structure
const menu as item_t = ("123"+"a",1,@func1) code
const menu1 as item_t = ("234"+"b",2,@func1) code
const menu2 as item_t = ("345"+"c",3,@func1) code
const submenu1 as item_t = ("sub"+"d",4,@func1) code
main:
' Main program
' Z=@menu
' Z=@submenu1
end.
I want to get first line adress
Z=@menu
and then access to other lines indirect
Z=Z+8
But compiler eliminate other const's
The array is not so necessary. The compiler arranges one after the other.
But how to stop throwing out constants?