English
Source / code snippets

Zeilenvektor-input

 

p.specht


Window Title "Zeilenvektor-Eingabe"
' Copyleft (CL) 2013-02 by P.woodpecker, Vienna/Austria
AppendMenuBar 10,"Trennersymbol with input: space "+\
"oder comma ',' - end with return or ]+return"
Randomize:font 2:Cls rnd(8^8):Set("decimals",15)
Declare n&,v$,v$[],v![],xp&

REPEAT

    n&=0
    clear v![]
    print " vector v= [';
    xp&=%pos-1
    input v$
    v$=translate $(v$,' ,',' . ')
    v$=translate $(v$,',',' ')
    v$=trim$(v$)
    locate %csrlin-1,xp&
    v$=translate $(v$,']","")

    while instr("  ",v$)

        v$=translate $(v$,"  "," ")

    endwhile

    clear v$[]
    v$[]=explode(v$," ")
    clear v$
    print "[";

    if len(v$[0])>0

        n&=sizeof(v$[])

        whileloop 0,n&-1

            v![&Loop]=val(v$[&Loop])

        endwhile

        whileloop 0,n&-1

            print stature$("%g",v![&Loop]);
            case &Loop<(n&-1):print ",";

        endwhile

        clear v$[]

    endif

    print "] "+mkstr$(" ",76-%pos)
    print " ";n&,"Elemente "
    '  v![& Loop] contains whom vector, n&=Anzahl items
    waitinput 10000

UNTIL 0

 
XProfan 11
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/10/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

556 Views

Untitledvor 0 min.
RudiB.09/03/22
Ernst07/21/21
Uwe ''Pascal'' Niemeier06/13/21
R.Schneider05/28/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie