Forum Navigation
You need to log in to create posts and topics.

Syntax alomoly with CFDictionaryRef

Posted by: maxetaylorjr <maxetaylorjr@...>

 I ran into this just now. Why does it work one way and not the other? 


This works and compiles just fine if the variable is predefined. It is a global.

CFDictionaryRef gFileDict
gFileDict = fn MutableDictionaryWithCapacity( 0 )

If put into a single line will not compile and produces the following error:

CFDictionaryRef gFileDict = fn MutableDictionaryWithCapacity( 0 )

  _4_NSLog.incl...ILB_DictionaryUsage.fbm.m:48:31: error: initializer element is not a compile-time constant
  CFDictionaryRef   gFileDict = MutableDictionaryWithCapacity( 0 )

Tested over and over to make sure and very repeatable.

—————————
by: Max Emmons Taylor Jr. ©
FB 7.0.12
OS 12.2.1 Monterey
Xcode 13.2.1
4VFK20629
—————————

--
To unsubscribe, send ANY message to: futurebasic-unsubscribe@freegroups.net To access the list archives, go to: http://freegroups.net/groups/futurebasic/