sscanf Inconsistencies

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

sscanf Inconsistencies

ソリューションへジャンプ
1,050件の閲覧回数
weblar
Contributor V

I'm trying to use the MQX sscanf implementation however I'm coming up with some issues.

 

I have the following function call...

 

char * key = (char *)calloc(32, sizeof(char));char * value = (char *)calloc(32, sizeof(char));int_32 matches = sscanf("Enabled = Y", "%[^=]=%s", key, value);// matches = 0// key = nothing// value = nothing

 An identical function call from Visual C returns 2 and both key and value contain "Enabled" and "Y" respectively.

 

Am I missing something?

0 件の賞賛
返信
1 解決策
887件の閲覧回数
c0170
Senior Contributor III

Hi kwebster83,

 

unfortunately, the feature you tested ( %[ ] array of characters) is not implemented in MQXs' sscanf. This format might be implemented in the future MQX release. Thank you for your input!

 

Regards,

MartinK

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
888件の閲覧回数
c0170
Senior Contributor III

Hi kwebster83,

 

unfortunately, the feature you tested ( %[ ] array of characters) is not implemented in MQXs' sscanf. This format might be implemented in the future MQX release. Thank you for your input!

 

Regards,

MartinK

0 件の賞賛
返信