View Single Post
Old 09-22-2016, 05:11 AM   #16
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 18,675
Default

^^^
That's what I hinted at

Code:
str_11 = "45-50-53";  match("%d%d%d",     str_11, v11a, v11b, v11c); 
str_12 = "40 51 55";  match("%d %d %d",   str_12, v12a, v12b, v12c);
str_13 = "68,98,108";  match("%d,%d,%d",  str_13, v13a, v13b, v13c); 

gfx_x =20; gfx_y =20;
gfx_r=1.00; gfx_g=0.80; gfx_b =0.00; gfx_a = 0.80;
gfx_x =20; gfx_y +=15; gfx_printf("%3d  %3d  %3d", v11a, v11b, v11c);
gfx_x =20; gfx_y +=15; gfx_printf("%3d  %3d  %3d", v12a, v12b, v12c); 
gfx_x =20; gfx_y +=15; gfx_printf("%3d  %3d  %3d", v13a, v13b, v13c);
Note that the '-' character is parsed as negating the following digits, not as a separator.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is online now   Reply With Quote