Page 1 of 1
[Implemented] Som Compiler Things
Posted: Tue Apr 18, 2006 1:56 am
by Konne
I would like the following Compiler\Debuger Commands:
The Debugger Command:
And the Compiler Command:
Code: Select all
CompilerVarSelect <Variable>
CompilerVarCase #PB_Word
CompilerVarEndselect
Posted: Tue Apr 18, 2006 5:29 pm
by MVXA
Since this was my idea, I'm likewise for the new
ViewMemory instruction.

Posted: Tue Apr 18, 2006 5:48 pm
by Flype
CompilerVarSelect <Variable>
CompilerVarCase #PB_Word
CompilerVarEndselect
i do not understand your request.
there's already these ones :
CompilerSelect
CompilerCase
CompilerEndselect
CompilerIf Defined(myvar,#PB_Variable)
Posted: Tue Apr 18, 2006 6:02 pm
by Flype
maybe this it what you need (?)
Code: Select all
Macro TypeOf(var)
If Defined(var, #PB_Constant): Debug "constant"
ElseIf Defined(var, #PB_Variable): Debug "variable"
; ElseIf Defined(var, #PB_Byte): Debug "byte"
; ElseIf Defined(var, #PB_Character): Debug "character"
; ElseIf Defined(var, #PB_Word): Debug "word"
; ElseIf Defined(var, #PB_Long): Debug "long"
; ElseIf Defined(var, #PB_Quad): Debug "quad"
; ElseIf Defined(var, #PB_Float): Debug "float"
; ElseIf Defined(var, #PB_Double): Debug "double"
ElseIf Defined(var, #PB_Array): Debug "array"
ElseIf Defined(var, #PB_LinkedList): Debug "linkedlist"
ElseIf Defined(var, #PB_Structure): Debug "structure"
ElseIf Defined(var, #PB_Interface): Debug "interface"
Else: Debug "undefined"
EndIf
EndMacro
a.l
b.f
NewList c.s()
Dim d.l(10)
TypeOf(a)
TypeOf(b)
TypeOf(c)
TypeOf(d)
but it needs to this macro some new defined types to works in an interessant way :
#PB_Byte
#PB_Character
#PB_Word
#PB_Long
#PB_Quad
#PB_Float
#PB_Double
rather than the very general #PB_Variable
:roll:
Posted: Tue Apr 18, 2006 6:03 pm
by remi_meier
I think they want a TypeOf() compile-time function.
Edit: right.
Posted: Tue Apr 18, 2006 6:04 pm
by Flype
i think so
