Best practices for passing C strings

Steve’s recent blog post might be relevant here regarding the intrinsic keyword.

Would this modification work perhaps?

block
    intrinsic trim

    if (trim_) then
        f_c_string = trim(string)//c_null_char
    else
        f_c_string = string//c_null_char
    end if

end block 
1 Like