You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fmt.Printf("%d%", 42) gives 42%!(NOVERB), spotting the percent with no following verb. fmt.Sscanf("42 314", "%d%", &i, &j) with ints i and j returns an error of bad verb %% for integer.
No %% occurs in the format specifier. The cause is parsenum() winding back from being at the end of the string, having processed the second %, to just before it so it's used as the verb in the error.
The text was updated successfully, but these errors were encountered:
mikioh
changed the title
fmt.Sscanf() doesn't complain of missing verb, but of bad verb %%.
fmt: Sscanf() doesn't complain of missing verb, but of bad verb %%.
Aug 29, 2015
rsc
changed the title
fmt: Sscanf() doesn't complain of missing verb, but of bad verb %%.
fmt: Sscanf says 'bad verb %%' for format string '%d%'
Oct 23, 2015
fmt.Printf("%d%", 42)
gives42%!(NOVERB)
, spotting the percent with no following verb.fmt.Sscanf("42 314", "%d%", &i, &j)
with ints i and j returns an error ofbad verb %% for integer
.No
%%
occurs in the format specifier. The cause is parsenum() winding back from being at the end of the string, having processed the second%
, to just before it so it's used as the verb in the error.The text was updated successfully, but these errors were encountered: