scanf

Par Ferran

Supporter (9)

Portrait de Ferran

26-12-2019, 23:42

My apologies,

does anyone know if SDCC has a scanf function for MSX? I'm trying something and my code seems to be breaking because of that. The closest I can find seems to be InputString in Fusion-C.

Thanks, and sorry for a very basic question.

Take care. Merry holidays.

!login ou Inscrivez-vous pour poster

Par ARTRAG

Enlighted (6398)

Portrait de ARTRAG

27-12-2019, 00:19

I've been looking for it for a while as well
there isn't any, at least for now

Par Ferran

Supporter (9)

Portrait de Ferran

27-12-2019, 11:23

Part of the issue is that the index of my copy (v 1.0) of the Fusion-C book stops at page 146. About half way through the book. Quite later, and I couldn't begin to guess what chapter it's in, but it's page 259 in my copy, it does mention scanf as a standard function, but... if I try a "Hello, world!" with an extra scanf, it breaks on compiling.

I think there shouldn't be that much trouble with my program getting it to use InputString, or others, but this is weird, and makes me uneasy about future surprises.

We'll see. Take care.

Par Wolverine_nl

Paragon (1101)

Portrait de Wolverine_nl

27-12-2019, 16:09

Or you have to write your own function by using getchar() , Konamimans website has this with sprintf() if I recall correctly or it is even standard with Fusion-C, at least getchar is.