Forum breadcrumbs - You are here:WeLoveGod RallysPublic Forums: futurebasicRe: New FB functionality in 7.0.1 …
You need to log in to create posts and topics.
Re: New FB functionality in 7.0.11
77,940 Posts
#1 · January 28, 2022, 5:18 pm
Quote from Forum Archives on January 28, 2022, 5:18 pmPosted by: fblistserve <fblistserve@...>
In reference to multi-line literal syntax Ken wrote:
Maybe some day the same functionality will come to CFStrings. 🙂IMO, loading temporary/intermediary arrays and dictionaries is more cumbersome than strings. There are several Apple calls which require passing in a dictionary and the ease of a literal is so handy. I don't remember having this problem with just pure strings since a mutable string can be appended 'n' times to achieve the goal ( see below demo - Ken knows all this but for those who might not ).All that being said, one of my long-term goals ( if I ever get my current project completed - sorry Bernie ) is to have simple CFString concatenation as currently implemented for pascal strings ( i.e. a = "x" + "y" ) . If pascal string support was removed some of the current pascal string logic could be repurposed for CFStrings, although it's by no means easy. Working around current pascal string support would mean parsing for @"x" instead of just "x". It would be nice to get to a point where "x" is just a CFString. Another thought: keep the current distinction but change our support to C strings( @"x" for CF, "x" for C string ) . C strings are super fast to execute and were used throughout the translator when pascal strings were removed from it.local fn MultiLineAppendCFMutableStringRef mutStr = fn MutableStringWithCapacity(0)fn MutableStringAppendString( mutStr, @"This" )fn MutableStringAppendString( mutStr, @"That" )fn MutableStringAppendString( mutStr, @"Cat" )fn MutableStringAppendString( mutStr, @"Dog" )fn MutableStringAppendString( mutStr, @"Elf" )fn MutableStringAppendString( mutStr, @"Witcher" )fn MutableStringAppendString( mutStr, @"Geralt" )fn MutableStringAppendString( mutStr, @"Get_Back" )fn MutableStringAppendString( mutStr, @"To" )fn MutableStringAppendString( mutStr, @"Where" )fn MutableStringAppendString( mutStr, @"You" )fn MutableStringAppendString( mutStr, @"Once..." )fn MutableStringAppendString( mutStr, @"Words" )fn MutableStringAppendString( mutStr, @"Of" )fn MutableStringAppendString( mutStr, @"Gratitude" )fn MutableStringAppendString( mutStr, @"Will" )fn MutableStringAppendString( mutStr, @"Rue" )fn MutableStringAppendString( mutStr, @"Your" )fn MutableStringAppendString( mutStr, @"Mystic" )fn MutableStringAppendString( mutStr, @"Envelope" )fn MutableStringAppendString( mutStr, @"Personified" )print mutStrend fnwindow 1,, (0,0,900,200)fn MultiLineAppendHandleEvents--
To unsubscribe, send ANY message to: [email protected] To access the list archives, go to: http://freegroups.net/groups/futurebasic/
Posted by: fblistserve <fblistserve@...>
In reference to multi-line literal syntax Ken wrote:
Maybe some day the same functionality will come to CFStrings. 🙂
IMO, loading temporary/intermediary arrays and dictionaries is more cumbersome than strings. There are several Apple calls which require passing in a dictionary and the ease of a literal is so handy. I don't remember having this problem with just pure strings since a mutable string can be appended 'n' times to achieve the goal ( see below demo - Ken knows all this but for those who might not ).
All that being said, one of my long-term goals ( if I ever get my current project completed - sorry Bernie ) is to have simple CFString concatenation as currently implemented for pascal strings ( i.e. a = "x" + "y" ) . If pascal string support was removed some of the current pascal string logic could be repurposed for CFStrings, although it's by no means easy. Working around current pascal string support would mean parsing for @"x" instead of just "x". It would be nice to get to a point where "x" is just a CFString. Another thought: keep the current distinction but change our support to C strings( @"x" for CF, "x" for C string ) . C strings are super fast to execute and were used throughout the translator when pascal strings were removed from it.
local fn MultiLineAppend
CFMutableStringRef mutStr = fn MutableStringWithCapacity(0)
fn MutableStringAppendString( mutStr, @"This" )
fn MutableStringAppendString( mutStr, @"That" )
fn MutableStringAppendString( mutStr, @"Cat" )
fn MutableStringAppendString( mutStr, @"Dog" )
fn MutableStringAppendString( mutStr, @"Elf" )
fn MutableStringAppendString( mutStr, @"Witcher" )
fn MutableStringAppendString( mutStr, @"Geralt" )
fn MutableStringAppendString( mutStr, @"Get_Back" )
fn MutableStringAppendString( mutStr, @"To" )
fn MutableStringAppendString( mutStr, @"Where" )
fn MutableStringAppendString( mutStr, @"You" )
fn MutableStringAppendString( mutStr, @"Once..." )
fn MutableStringAppendString( mutStr, @"Words" )
fn MutableStringAppendString( mutStr, @"Of" )
fn MutableStringAppendString( mutStr, @"Gratitude" )
fn MutableStringAppendString( mutStr, @"Will" )
fn MutableStringAppendString( mutStr, @"Rue" )
fn MutableStringAppendString( mutStr, @"Your" )
fn MutableStringAppendString( mutStr, @"Mystic" )
fn MutableStringAppendString( mutStr, @"Envelope" )
fn MutableStringAppendString( mutStr, @"Personified" )
print mutStr
end fn
window 1,, (0,0,900,200)
fn MultiLineAppend
HandleEvents
--
To unsubscribe, send ANY message to: [email protected] To access the list archives, go to: http://freegroups.net/groups/futurebasic/
Click for thumbs down.0Click for thumbs up.0