Problems with Maps

All bugs related to new C backend
User avatar
jacdelad
Enthusiast
Enthusiast
Posts: 154
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa
Contact:

Re: Problems with Maps

Post by jacdelad »

I didn't put it there and wasn't aware I could. [Done].
User avatar
Tenaja
Addict
Addict
Posts: 1829
Joined: Tue Nov 09, 2010 10:15 pm

Re: Problems with Maps

Post by Tenaja »

jacdelad wrote: Wed Oct 13, 2021 6:41 am I didn't put it there and wasn't aware I could. [Done].
Fred does that after fixing a bug (or determining it's not a bug). However, the fixed version might not be released yet. Are you using alpha 6? What's the release date of that compared to his Done date on this thread?
juergenkulow
User
User
Posts: 64
Joined: Wed Sep 25, 2019 10:18 am

Re: Problems with Maps

Post by juergenkulow »

Code: Select all

; Adr mymap
Global NewMap mymap.s()
Procedure Test(*Test)
  SetClipboardText(Hex(*Test))
EndProcedure
s.s="Test"
Define *p 
Debug FormatDate("%dd.%mm.%yyyy",GetFileDate("F:\PureBasicAlpha5b\Compilers\pbcompilerc.exe",#PB_Date_Modified)) ;28.09.2021
; *p=@mymap(s)
; Error: Assembler
; error: lvalue required As unary '&' operand
;  p_p=(void*)((integer)(&((void**)PB_GetMapElement(m_mymap.a,v_s))));
;                        ^
! p_p=(void*)PB_GetMapElement(m_mymap.a,v_s);
Test(*p) 
;2016E0
User avatar
jacdelad
Enthusiast
Enthusiast
Posts: 154
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa
Contact:

Re: Problems with Maps

Post by jacdelad »

Tenaja wrote: Wed Oct 13, 2021 11:41 am Fred does that after fixing a bug (or determining it's not a bug). However, the fixed version might not be released yet. Are you using alpha 6? What's the release date of that compared to his Done date on this thread?
I know that Fred does it, I was just not aware that I can edit my own titles too. However, I'm not using Alpha 6 since it hasn't been released yet. From my experience I can't use the pointer to a map as a functions argument. Using an integer as temporary variable works. The rest is up to Fred.
Post Reply