English
Forum

Done: rnd problem

 
one mean it hardly, I program again. (so have I some The large Überraschung taken)

with my derzeitigen proposition play Zufallsgeneratoren a large strain. however shining The casually selection not integrally To klappen.
CompileMarkSeparation
randomize

whilenot e%

    if classes%=1

        sizerate%=rnd(150)

    elseif classes%=2

        sizerate%=rnd(100)

    elseif classes%=3

        sizerate%=rnd(50)
        e%=1

    endif

    if classes%=1 and sizerate%>75

        e%=1

    elseif classes%=2 and sizerate%>50

        e%=1

    endif

wend

e%
n>0

if classes%=3 is functions The Loop wonderful, has classes however the value 1 or 2, power my PC nothing and depends apparently in the Loop solid.
Is determined time again what utterly dummes, I sehs come. but yet versteh I not.

another question: randomize counts for all nachfolgenden rnd or?

Greeting
CHT
 
06/23/09  
 




Jörg
Sellmeyer
How should it too what other make, there You in the if-structure only classes% = 3 e% on 1 setting
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/23/09  
 




RGH
Hi,

the gelistete Program Although for want of Vraiablendeklarationen not laufffähig, so I not try could, but one Error falls softort on: it are missing The clinging with whom terms! (See in the Help under "6. Operatoren", cue "Hierarchie".) so goes it presumably:
CompileMarkSeparation
...

elseif (classes% = 2) and (sizerate% > 50)
/pre>

In Your code would because of the Hierarchie first of all "2 and sizerate%" aufgelöst and this is either 1 or 0. then would "classes% = 1" or "classes% = 0" aufgelöst and be this yields again either 1 or 0. and there this never larger 50 is, is the circumstance without clinging always wrong, completely independent of worth sizerate%.

small Tipp: If one the Hierarchie the Operators not remember wants or can, simply always The clinging so settle, How one it gewertet having would like.

there it different Languages (and self different BASIC-Dialekte) different manage, have I on the Hierarchie the Language orientiert, in the I XProfan written have: Pascal. (I use Delphi and Delphis Programming-Language is Object-Pascal.)

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
06/23/09  
 



naja, I have Yes another second if, where I the request

self with
CompileMarkSeparation
whilenot e%

    if classes%=1

        sizerate%=rnd(150)

        if classes%=1 and sizerate%>75

            e%=1

        endif

    elseif classes%=2

        sizerate%=rnd(100)

        if classes%=2 and sizerate%>50

            e%=1

        endif

    elseif classes%=3

        sizerate%=rnd(50)
        e%=1

    endif

wend


does itself nothing.

i see my Error not

Greeting
CHT
 
06/23/09  
 




Dieter
Zornow
have you got Rolands Posting not red.

in your second If-request
CompileMarkSeparation
if (classes%=2) and (sizerate%>50)re>

The clinging settle then GEHTS
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
06/23/09  
 



I have RGH´s mail unfortunately first in the Nachhinein seen, because I something used have with my own mail and yet something examined have.
So I look time ...
... and objectively! what 4 clinging so turn off can. thanks on RGH and Dieter!

Greeting
CHT
 
06/23/09  
 



[offtopic]
against the trouble derartiger Posting-Überschneidungen have I already one middle in the Test.
so becomes one Posting immediate displayed to the dispatching - even if one strain a Posting verfässt.
likewise becomes then in the Thread To see his, whether a Member strain a Posting verfässt, because the Posting already appear with corresponding Bemerk and one "Stift".
[/offtopic]
 
06/23/09  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.893 Views

Untitledvor 0 min.
iF09/14/20
RudiB.05/17/20
Untitled09/01/19
Pauli04/15/13
More...

Themeninformationen



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