Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #3201

Question about "sprintf" "@" "do for"

From Jörg Buchholz <bookwood4news@freenet.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Question about "sprintf" "@" "do for"
Date 2016-02-02 20:49 +0100
Organization A noiseless patient Spider
Message-ID <n8r13l$bdu$1@dont-email.me> (permalink)

Show all headers | View raw


Hello,

this works:

A1=1
A2=2
A3=3

i=1
vari=sprintf("A%.f",i)
print vari,"=",@vari
i=i+1
vari=sprintf("A%.f",i)
print vari,"=",@vari
i=i+1
vari=sprintf("A%.f",i)
print vari,"=",@vari

do for [i=1:3]{
vari=sprintf("A%.f",i)
print vari
}

But I want to have "print vari,"=",@vari" in the loop. But it dosen't 
work. Why can't I use "print vari,"=",@vari" in the loop? Is there a 
solution for?

Jörg

Back to comp.graphics.apps.gnuplot | Previous | NextNext in thread | Find similar


Thread

Question about "sprintf" "@" "do for" Jörg Buchholz <bookwood4news@freenet.de> - 2016-02-02 20:49 +0100
  Re: Question about "sprintf" "@" "do for" Ethan A Merritt <sfeam@users.sourceforge.net> - 2016-02-02 16:05 -0800
    Re: Question about "sprintf" "@" "do for" Jörg Buchholz <bookwood4new@freenet.de> - 2016-02-03 07:30 +0100

csiph-web