      static double mp_da_back_or_pop(_cimg_math_parser& mp) {
        const bool is_pop = (bool)mp.opcode[4];
        const char *const s_op = is_pop?"da_pop":"da_back";
        mp_check_list(mp,s_op);
        const unsigned int
          dim = (unsigned int)mp.opcode[2],
          ind = (unsigned int)cimg::mod((int)_mp_arg(3),mp.imglist.width());
        double *const ptrd = &_mp_arg(1) + (dim>1?1:0);
        CImg<T> &img = mp.imglist[ind];
        int siz = img?(int)img[img._height - 1]:0;
        if (img && (img._width!=1 || img._depth!=1 || siz<0 || siz>img.height() - 1))
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function '%s()': "
                                      "Specified image (%d,%d,%d,%d) cannot be used as dynamic array%s.",
                                      mp.imgout.pixel_type(),s_op,img.width(),img.height(),img.depth(),img.spectrum(),
                                      img._width==1 && img._depth==1?"":" (contains invalid element counter)");
        if (!siz)
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function '%s()': "
                                      "Specified dynamic array #%d contains no elements.",
                                      mp.imgout.pixel_type(),s_op,(int)_mp_arg(3));

        double ret = cimg::type<double>::nan();
        if (dim<1) ret = img[siz - 1]; // Scalar element
        else cimg_forC(img,c) ptrd[c] = img(0,siz - 1,0,c); // Vector element
        if (is_pop) { // Remove element from array
          --siz;
          if (img.height()>32 && siz<2*img.height()/3) // Reduce size of dynamic array
            img.resize(1,std::max(2*siz + 1,32),1,-100,0);
          img[img._height - 1] = (T)siz;
        }
        return ret;
      }
      static double mp_da_back_or_pop(_cimg_math_parser& mp) {
        const bool is_pop = (bool)mp.opcode[4];
        const char *const s_op = is_pop?"da_pop":"da_back";
        mp_check_list(mp,s_op);
        const unsigned int
          dim = (unsigned int)mp.opcode[2],
          ind = (unsigned int)cimg::mod((int)_mp_arg(3),mp.imglist.width());
        double *const ptrd = &_mp_arg(1) + (dim>1?1:0);
        CImg<T> &img = mp.imglist[ind];
        int siz = img?(int)img[img._height - 1]:0;
        if (img && (img._width!=1 || img._depth!=1 || siz<0 || siz>img.height() - 1))
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function '%s()': "
                                      "Specified image (%d,%d,%d,%d) cannot be used as dynamic array%s.",
                                      mp.imgout.pixel_type(),s_op,img.width(),img.height(),img.depth(),img.spectrum(),
                                      img._width==1 && img._depth==1?"":" (contains invalid element counter)");
        if (!siz)
          throw CImgArgumentException("[" cimg_appname "_math_parser] CImg<%s>: Function '%s()': "
                                      "Specified dynamic array #%d contains no elements.",
                                      mp.imgout.pixel_type(),s_op,(int)_mp_arg(3));

        double ret = cimg::type<double>::nan();
        if (dim<1) ret = img[siz - 1];  
        else cimg_forC(img,c) ptrd[c] = img(0,siz - 1,0,c);  
        if (is_pop) {  
          --siz;
          if (img.height()>32 && siz<2*img.height()/3)  
            img.resize(1,std::max(2*siz + 1,32),1,-100,0);
          img[img._height - 1] = (T)siz;
        }
        return ret;
      }