From 1ce70c40c0ea52f56d3c017c44c8e456a403ce81 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 11 Aug 2005 15:02:40 +0000 Subject: fixed integer representation rename help file more fixes svn path=/trunk/; revision=3419 --- externals/grill/deljoin/deljoin-help.pd | 20 ++++++++++++++++++++ externals/grill/deljoin/help-deljoin.pd | 20 -------------------- externals/grill/deljoin/main.cpp | 12 +++++++----- 3 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 externals/grill/deljoin/deljoin-help.pd delete mode 100644 externals/grill/deljoin/help-deljoin.pd (limited to 'externals/grill') diff --git a/externals/grill/deljoin/deljoin-help.pd b/externals/grill/deljoin/deljoin-help.pd new file mode 100644 index 00000000..bf49460e --- /dev/null +++ b/externals/grill/deljoin/deljoin-help.pd @@ -0,0 +1,20 @@ +#N canvas 300 90 462 290 12; +#X msg 247 89 symbol -; +#X msg 232 62 list; +#X msg 259 115 list +; +#X obj 105 229 print; +#X symbolatom 266 143 10 0 0 0 - - -; +#X msg 44 66 a b c d e f; +#X msg 217 34 0; +#X obj 105 203 deljoin 0; +#X text 254 21 no delimiter; +#X text 272 62 space; +#X msg 208 11 bang; +#X connect 0 0 7 1; +#X connect 1 0 7 1; +#X connect 2 0 7 1; +#X connect 4 0 7 1; +#X connect 5 0 7 0; +#X connect 6 0 7 1; +#X connect 7 0 3 0; +#X connect 10 0 7 1; diff --git a/externals/grill/deljoin/help-deljoin.pd b/externals/grill/deljoin/help-deljoin.pd deleted file mode 100644 index bf49460e..00000000 --- a/externals/grill/deljoin/help-deljoin.pd +++ /dev/null @@ -1,20 +0,0 @@ -#N canvas 300 90 462 290 12; -#X msg 247 89 symbol -; -#X msg 232 62 list; -#X msg 259 115 list +; -#X obj 105 229 print; -#X symbolatom 266 143 10 0 0 0 - - -; -#X msg 44 66 a b c d e f; -#X msg 217 34 0; -#X obj 105 203 deljoin 0; -#X text 254 21 no delimiter; -#X text 272 62 space; -#X msg 208 11 bang; -#X connect 0 0 7 1; -#X connect 1 0 7 1; -#X connect 2 0 7 1; -#X connect 4 0 7 1; -#X connect 5 0 7 0; -#X connect 6 0 7 1; -#X connect 7 0 3 0; -#X connect 10 0 7 1; diff --git a/externals/grill/deljoin/main.cpp b/externals/grill/deljoin/main.cpp index d01e8fed..06d41d8b 100755 --- a/externals/grill/deljoin/main.cpp +++ b/externals/grill/deljoin/main.cpp @@ -130,11 +130,13 @@ void deljoin::m_list(const t_symbol *s,int argc,const t_atom *argv) const t_atom &a = argv[i]; if(IsSymbol(a)) strcpy(t,GetString(a)); - else if(IsInt(a)) { - STD::sprintf(t,"%i",GetInt(a),10); - } - else if(IsFloat(a)) { - STD::sprintf(t,"%f",GetFloat(a),10); + else if(CanbeFloat(a)) { + const float f = GetAFloat(a); + const int fi = (int)f; + if(f == fi) + STD::sprintf(t,"%i",fi,10); + else + STD::sprintf(t,"%f",f,10); } // else do nothing -- cgit v1.2.1