Calling scanf from Ada
问题 How do you call scanf from Ada? That is, presumably with an appropriate pragma import declaration, but what would the declaration look like? (I'm interested in how to call C functions of the more unruly variety from Ada, not how to parse strings per se, so I'm not looking for a pure Ada solution. My setup is Gnat, Ubuntu Linux, x64 if it makes a difference.) 回答1: This paper points out that Ada has no way of declaring a function that takes different numbers of parameters of different types.