n facto 6
n prod facto
: dofact
i facto = 1
. prod
z
f
i facto > 1
n facto facto - 1
n prod prod * facto
f
g dofact
. 000 Help SB.txt FOR SB.exe (B+=MGA) rev 2018-09-14 Drag AND drop *B.txt file onto SB.exe TO RUN it.
. (All lines here are PRINT lines, drag AND drop this file onto SB.exe TO READ it without dots.)
. TO avoid punctuation, all executed lines start with keyword commands OR punctuation AS follows:
. =========================================================================================================== VARIABLES
. Number variables are set st n IS first letter ON LINE, variable NAME IS NEXT, AND variable expression last.
. Use up TO 250 "words" FOR variable AND expression including previous number variables, operators: +-*/^%()<=>
. constants: e, pi, RND trig functions (radians): COS(), SIN(), TAN(), atan(), conversion: rad(), deg(), INT()
. LOG(), EXP(), operators USING <, =, >, (NOT combinations >= <=) AND, OR, NOT, need TO be separated by spaces.
. example: i = i + 1 becomes >>>>> n i i+1
. angle = deg(atan(1.01) becomes > n angle deg(atan(1.01))
. =========================================================================================================== ARRAYS
. < arrayName index valueExpression - same AS arrayName(index) = valueExpression (No DIM statement needed)
. > var arrayName index - same AS var = arrayName(index)
. =========================================================================================================== OUTPUT
. FOR printing text: . FOR PRINT with LINE feed, , FOR PRINT AND TAB, ; FOR PRINT AND STOP
. l row col - FOR locating NEXT character cell FOR PRINT OR INPUT place
. a x y text - FOR locating with graphic x, y pixel positions
. c - TO CLEAR clutter
. variables in PRINT text will be replaced by their values, so be careful USING variable names in PRINT text.
. When there IS more than one parameter be careful NOT TO use a space in an expression FOR one of the parameters.
. =========================================================================================================== INPUT
. ? var prompt - syntax: ? IS keyword, variable NAME, use 250 words FOR prompt.
. =========================================================================================================== EXECUTION FLOW
. : lineLabel - sets LINE label in program
. g lineLabel - redirects flow TO mark lineLabel ( DO NOT enter OR EXIT a SUB with go )
. s subLabel - marks start of GOSUB routine
. gs subLabel - redirects flow TO SUB routine
. r - signals EXIT back TO CALL POINT of SUB routine
. w - will pause the given amount of seconds
. z - will END program
. =========================================================================================================== LOOPING
. [ - marks start of LOOP
. ] - marks the END of LOOP, required with DO
. x - commands EXIT from LOOP
. =========================================================================================================== BOOLEAN BLOCKS
. i - starts one AND IS followed by Boolean expression TO evaluate
. e - optional, marks LINE TO GOTO IF Boolean evaluates false
. f - marks END of Boolean block
He describes it nicely here:
https://www.qb64.org/forum/index.php?topic=16.msg115312#msg115312
. 000 Help SB.txt for SB.exe (B+=MGA) rev 2018-09-14 Drag and drop *B.txt file onto SB.exe to run it.38 line Manual, not bad!
. (All lines here are print lines, drag and drop this file onto SB.exe to read it without dots.)
. To avoid punctuation, all executed lines start with keyword commands or punctuation as follows:
. =========================================================================================================== VARIABLES
. Number variables are set st n is first letter on line, variable name is next, and variable expression last.
. Use up to 250 "words" for variable and expression including previous number variables, operators: +-*/^%()<=>
. constants: e, pi, rnd trig functions (radians): cos(), sin(), tan(), atan(), conversion: rad(), deg(), int()
. log(), exp(), operators using <, =, >, (not combinations >= <=) and, or, not, need to be separated by spaces.
. example: i = i + 1 becomes >>>>> n i i+1
. angle = deg(atan(1.01) becomes > n angle deg(atan(1.01))
. =========================================================================================================== ARRAYS
. < arrayName index valueExpression - same as arrayName(index) = valueExpression (No DIM statement needed)
. > var arrayName index - same as var = arrayName(index)
. =========================================================================================================== OUTPUT
. For printing text: . for print with line feed, , for print and tab, ; for print and stop
. l row col - for locating next character cell for print or input place, l for locate
. @ x y text - for locating with graphic x, y pixel positions, @ for at
. c - to clear clutter, c for cls
. variables in print text will be replaced by their values, so be careful using variable names in print text.
. When there is more than one parameter be careful not to use a space in an expression for one of the parameters.
. =========================================================================================================== INPUT
. ? var prompt - syntax: ? is keyword, variable name, use 250 words for prompt. Input numbers only for var.
. =========================================================================================================== EXECUTION FLOW
. : lineLabel - sets line label in program
. g lineLabel - redirects flow to mark lineLabel ( do not enter or exit a sub with go ), g for goto
. s subLabel - marks start of gosub routine, s for sub
. gs subLabel - redirects flow to sub routine, gs for gosub
. r - signals exit back to call point of sub routine, r for return
. w - will pause the given amount of seconds, w for wait
. z - will end program, z for last or end
. =========================================================================================================== LOOPING
. [ - marks start of loop, think do
. ] - marks the end of loop, required with ], think loop
. x - commands exit from loop, think exit
. =========================================================================================================== BOOLEAN BLOCKS
. i - starts one and is followed by Boolean expression to evaluate
. e - optional, marks line to goto if Boolean evaluates false
. f - marks end of Boolean block
try recursive calls to gosub (gs) for factorial b+ 2020-03-07
[
? factorialMe Enter a number to find it's factorial
i factorialMe <> 0
n Fac 1
gs F!
. Factorial = Fac
e
. Goodbye!
z
f
.
]
s F!
i factorialMe > 1
n Fac Fac * factorialMe
n factorialMe factorialMe - 1
gs F!
e
r
f
r
test new string functions SB.txt B+ 2018-09-15
$ months {January February March April May June July August September October November December} < this is new string literal recorder
l 2*5 10/10 <I am just testing locate l here
[
'c
? nMonth Enter month number to name >
i nMonth > 0 and nMonth < 13
sf xmonth word months nMonth < sf stands for string function, xmonth is var to load word returns the nth word in string
opps can't comment next lines because they are printing a formatted line
; The nMonth
; th Month of a year is xmonth
next line adds period to end of formatted print line
. .
e
x
f
]
`Bplus\'s language is "very" excellent.'
Bplus's language is "very" excellent.
I have reworked Eval that fixed problem of differentiation between - for minus and - for negative values and uses Split instead of Word tools for parsing just haven't installed it yet. It should deliver values from array immediately instead of counting down a string every time a value is needed.
Well it's shorthand, but I wouldn't call it BASIC. I do get the fun factor in regard to manipulating code back into usable statements. There are a lot of condition hurdles to address. This reminds me of mennonite's Fig Basic project, bt with a totally different focus. Now if you will excuse me, I have to get back to my own rabbit hole.
Pete
I'm all for this.Oh I already have stuff for evaluating formulas as independent exe you can call in a shell from inside your Basic code.
Actually, I'm for both rabbitholes. Hear me out:
bplus: make your language as portable as humanly possible in the sense that I should be able to bootstrap a screen-0 kernel of it onto any other BAS project. Make something like MasterEval$(a$), where a$ is any valid code in your language, and MasterEval$ returns its evaluated result. Text in, text out.
Pete: make your text editor able to include bplus's language. (If done right, this surgery is less than 5 lines.) For instance, when I'm typing, I want to write expressions and evaluate them, and have the result is pasted in where I was typing.
(Even if you think this idea is extremely dumb, you should be designing for it's eventuality anyway.)
Mark
do you have complete code of this program?
I'm all for this.
Actually, I'm for both rabbitholes. Hear me out:
bplus: make your language as portable as humanly possible in the sense that I should be able to bootstrap a screen-0 kernel of it onto any other BAS project. Make something like MasterEval$(a$), where a$ is any valid code in your language, and MasterEval$ returns its evaluated result. Text in, text out.
Pete: make your text editor able to include bplus's language. (If done right, this surgery is less than 5 lines.) For instance, when I'm typing, I want to write expressions and evaluate them, and have the result is pasted in where I was typing.
(Even if you think this idea is extremely dumb, you should be designing for it's eventuality anyway.)
The replace part, Bill, is what I think you are getting act. So using the example above, you mean type in something like: idiot ^ 2 the editor erases that and replaces it with Clippy / 10. Something like that, right?
Test 6 the New ei command.txt b+ 2021-02-12 ei AKA ElseIf
., Let's examine the common factors of some numbers:
.,
[,
.,
?,num; Please enter a number to test >
<,<2;'num;2
i,'<2
x,
e,
%,Nmod2;'num;2
=,Even;'Nmod2;0
%,Nmod3;'num;3
=,Triple;'Nmod3;0
%,Nmod5;'num;5
=,Pentacle;'Nmod5;0
%,Nmod7;'num;7
=,Septacle;'Nmod7;0
i,'Even
., ;'num; is Even.
ei,'Triple
., ;'num; is Triple.
ei,'Pentacle
., ;'num; is Pentacle.
ei,'Septacle
., ;'num; is Septacle.
e,
+,Remaining;1;-.5;-.1667;-.0333;-.0048
., The probability of ;'num; not being factorable by 2,3,5,7 is;'Remaining
f,
f,
],
.,
., Thanks for playing.
Test 6 the New ei command.txt b+ 2021-02-12 ei AKA ElseIf
. Let's examine the common factors of some numbers:
.
[
.
? num, " Please enter a number to test >
< <2, num, "2
i <2
x
e
% Nmod2, num, "2
= Even, Nmod2, "0
% Nmod3, num, "3
= Triple, Nmod3, "0
% Nmod5, num, "5
= Pentacle, Nmod5, "0
% Nmod7, num, "7
= Septacle, Nmod7, "0
i Even
. , num, " is Even.
ei Triple
. , num, " is Triple.
ei Pentacle
. , num, " is Pentacle.
ei Septacle
. , num, " is Septacle.
e
+ Remaining, "1, "-.5, "-.1667, "-.0333, "-.0048
. The probability of , num, " not being factorable by 2 3 5 7 is, Remaining
f
f
]
.
. Thanks for playing.
p$ = "["
p$ = p$ + NL$ + "? num, Please enter a number to test > "
p$ = p$ + NL$ + "i num < 2"
p$ = p$ + NL$ + "x"
p$ = p$ + NL$ + "e"
p$ = p$ + NL$ + "i num % 2 = 0"
p$ = p$ + NL$ + ". num, is Even."
p$ = p$ + NL$ + "ei num % 3 = 0"
p$ = p$ + NL$ + ". num, is Triple."
p$ = p$ + NL$ + "ei num % 5 = 0"
p$ = p$ + NL$ + ". num, is Pentacle."
p$ = p$ + NL$ + "ei num % 7 = 0"
p$ = p$ + NL$ + ". num, is Septacle."
p$ = p$ + NL$ + "e"
p$ = p$ + NL$ + "remaining = 1 - .5, - .1667 - .0333 -.0048"
p$ = p$ + NL$ + ". The probability of , num, not being factorable by 2 3 5 7 is , remaining,."
p$ = p$ + NL$ + "f"
p$ = p$ + NL$ + "f"
p$ = p$ + NL$ + "]"
p$ = p$ + NL$ + ". "
p$ = p$ + NL$ + ". Thanks for playing."
Alrighty, trying to glue this all together.
Heya bplus, is there a way you could explain this as if I just walked in? There is a mixture of history, other programs, links to other places - all over this thread. Maybe a 30 second video of you using this?
Or: How close are you you to distilling this to the smallest black box possible? That is, output$ = bpluseval$(input$), and that's it. If you claim you're already here, I want to see the whole thing at once please.
The goal is to be able to paste your work brainlessly into a REPL-like shell and use it that way. That will till me its ready to may greater purposes! (All I mean is integration into things like QLiza, or sending info around using pipecom.)
The goal is to be able to paste your work brainlessly into a REPL-like shell and use it that way. That will till (tell?)* me its ready to may (my?)* greater purposes! (All I mean is integration into things like QLiza (yeah I want to integrate with Liza2)*, or sending info around using pipecom.)*Stuff in () added by me bplus.
' Test 3 new j for jump command for SB1.txt b+ 2021-02-16
LoopCount = 0
[
LoopCount = LoopCount + 1
j LoopCount > 14
k = 0
[
; *;
' oh dang this is bad i need i for indexes back to If for that command!
k = k + 1
' dang I cant use k = LoopCount but >= works!
j k >= LoopCount
]
.
]
. And we are out of the loop and done with this test with 14 lines of stars?
' Test 4 Arithmetics.txt b+ 2021-02-17
a = 1
b = 2
c = 3
d = 4
e = 5
' yeah when I get to arrays...
f = e + a
g = e + b
h = e + c
i = e + d
j = e * 2
. a = ;a;/ b = ;b;/ c = ;c;/ d = ;d;/ e = ;e;/ f = ;f;/ g = ;g;/ h = ;h;/ i = ;i;/ j = ;j
+ result;a;b;c;d;e;f;g;h;i;j
. a + b +... + j = ;result
* result;a;b;c;d;e;f;g;h;i;j
. a * b *... * j = ;result
& result;a;b;c;d;e;f;g;h;i;j
. a & b &... & j = ;result
a = 7
. a = ;a
+= a;3.3
. a += 3.3 is ;a
-= a;3.3
. a -= 3.3 is ;a
*= a;3.3
. a *= 3.3 is ;a
/= a;3.3
. a /= 3.3 is ;a
'Test 6 the New ei command.txt b+ 2021-02-12 ei AKA ElseIf
' name change update If, It, Io, Ix
' may be read: If, If True, If Otherwise, If eXit
. Let's examine the common factors of some numbers:
[
? num; (Enter only will end Run) Please enter a number to test >
If num < 2
Exit
Io
If num % 2 = 0
. / ; num; is Even.
It num % 3 = 0
. / ;num ; is Triple.
It num % 5 = 0
. / ; num; is Pentacle.
It num % 7 = 0
. / ; num ; is Septacle.
Io
remaining = 1 - 1/2 - 1/6 - 1/30 - 1/210
. / ;The probability of ; num; not having a First Factor of 2, 3, 4, 5 or 7 is ; remaining;.
Ix
.
Ix
]
.
. Thanks for playing.
' Test 3 new j for jump command for SB1.txt b+ 2021-02-16 mod 2-21
[
+= loopCount;1
Jmp loopCount > 14
k = 0
[
; *;
+= k;1
Jmp k = LoopCount
]
.
]
. And we are out of the loop and done with this test with 14 lines of stars?
' Test ad Simple Prime Sieve.txt rev from SB.exe 2018-09-14 adopted from:
' Simple sieve 2.bas SmallBASIC 2015-04-29 found a faster sieve with BASIC 256
topN = 1000
limit = topN ^ .5
. Primes to ;topN
' take care of even numbers first
' prime the pump
[
+= i;1
Jmp i > topN
Set 0; i; composites
]
i = 4
[
Set 2; i; composites
+= i;2
Jmp i > topN
]
' now do odd numbers
i = 3
[
Get test; i; composites
If test = 0
If i < limit
j = 2 * i
[
Set i; j; composites
+= j;i
Jmp j > topN
]
Fi
Fi
i = i + 2
Jmp i > limit
]
i = 2
pCount = 0
[
Get test; i; composites
If test = 0
+= pCount;1
, i
Fi
+= i;1
Jmp i > topN
]
.
.
. / There are ;pCount;/ primes for the first ; topN;/ integers.
' Test ab ...and 1 for the monkey.txt rev for SB.exe convert 2021-02-20
' from ... and 1 for the monkey problem.bas for JB 2.0 b 2018-02-11
' Completely rewritten 2021-02-21.
People = 5
nutStart = 100
[
. / ... and one for the Monkey
.
. / There are 5 people and 1 monkey on an island.
. / Yesterday the amount of coconuts they collect is ; nutStart
' track nut inventory with:
nutsNow = nutStart
. / Last night, each person goes to the pile, takes a fith
. / gives 1 coconut to the monkey and hides the remaining.
. / (No coconuts are cut into parts in this problem.)
.
p = 0
monkey = 0
nutsNow = nutStart
[
+= p;1
Jmp p > People
fith = Int( nutsNow / People )
If fith >= 1
-= nutsNow; fith
+= monkey; 1
-= fith;1
Fi
+= fith;0
set fith; p; piles
. / For person ;p;/ their pile is ; fith; coconut(s).
]
. / So the remaining coconuts after last night is ;nutsNow
. / ... and the monkey has ;monkey
.
. / This morning, they give the monkey a coconut and divide
. / the remaining pile by number of people, what is the size
. / of everyone's pile?
.
. / Coconuts starting today is ; nutsNow
If nutsNow > 0
monkey = monkey + 1
nutsNow = nutsNow -1
Fi
fith = int( nutsNow / People )
. / So each person gets ; fith;/ more coconuts.
p = 0
[
+= p;1
Jmp p > People
Get curr; p; piles
total = curr + fith
. / Person ;p; had hidden ;curr; and gets ;fith; so has ; total
-= nutsNow; fith
]
. / The monkey has ; monkey;/ coconuts.
. / There remains ; nutsNow; nuts for this author.
.
-= NutStart; 10
If nutStart > 0
loc 34; 5
. ZZZ... press any to see day with 10 less coconuts to start
Zzz
Cls
El
Exit
Fi
]
. / Good bye!
End
a = a + 10
a += 10
a$ = a$ + z$ is not the same as a$ = z$ + a$
but
a = a + b is the same as a = b + a
guess so but what is the short hand for
a$ = z$ + a$
a$ =+ z$
VS
a$ += z$
I mean, why not?
Ok that'll work, but we got more than 640 K of memory now a days.
@SMcNeill
Yeah, why not? What could possibly go wrong with that? ;-)) on my ToDo List
Originally += was a first argument in string command and those are fairly easy to code but I should be able to work in variable first commands I started for strings. But =+ makes more sense reading wise.
Honestly, if I was to adopt such shortcuts, I’d keep the implementation very simple.
+= says whatever is in front of the + goes to the left on what’s on the right of the equal sign.
=+ says whatever is left of the equal sign goes to the far right of the plus sign.
a += b + c would be the equivalent of a = a + b + c
a =+ b + c would be the equivalent of a = b + c + a
If you wanted a = b + a + c, then you’d just have to type that out without any shorthand.
a = “butter”
b = “pea”
c = “nut”
a =+ b + c
a is now “peanutbutter”. ;)
' Test ag First String Functions.txt b+ 2021-02-23& 24 reworked $ functionName arg1, arg2,...
. Ways to assign a var
. var = numeric expression (this is for a variable expected to be a number)
. var ""literal (starts immediately after 2nd ") probably fastest and cleanest, remember no space!
.
. Introducing: First String Functions Case Insensitive !!! put all literals right next to comma !!!
. HEAD Syntax: var $ Head source$, endCharPos# > var = mid$(source, 1, endCharPos)
. TAIL Syntax: var $ Tail source$, headEndPos# > var = mid$(source$, headEndPos + 1)
. MID1 Syntax: var $ Mid1 source$, charPos# > var = mid$(source$, charPos#, 1)
. MID$ Syntax: var $ Mid$ source$, startPos#, nChars# > var = Mid$(source$, startPos#, nChars#)
. INSTR2 Syntax: var $ Instr2 source$,literalMatch > var = TS$(Instr(source$, find$)
. INSTR3 Syntax: var $ Instr3 start#, source$,literalMatch > var = TS$(Instr(start#,source$, match$))
. LEN Syntax: var $ Len source$ > var = TS$(Len(source$))
. SPC Syntax: var $ Spc amountOfSpaces# > var = SPC(amountOfSpaces)
. & Syntax: var $ & a1,a2,a3,... > var = a1 + a2 + a3 + ...
hw ""Hello World!
char_H ""H
char_W ""W
. Did it take? show how hw was set in code:
' dot in next line should prevent activating "", it does.
. hw ""Hello World!
' test the "" method of variable assignment
. And hw has the value: ;hw;/ and char_H: ;char_H;/ and char_W: ;char_W
hwLen $ len hw
. And hw has the len of: ;hwLen
.
. Here we try String Functions involving MID$: Head, Tail, Mid$, Mid1
hello $ Head hw, 6
world $ Tail hw, 6
low $ Mid$ hw, 4, 4
first $ mid1 hw,1
' actually if the literal is numeric and positive you can have a space after comma.
seventh $ mid1 hw, 7
. / Head 6 chars = *; hello ;*
. / Tail from 6 + 1 = *; world ;*
. / Mid$ from 4, 4 chars = *; low ;*
. / What's at the first (first $ mid1 hw,1)and seventh positions? answer: ;first;/ and ;seventh
.
find_lh $ instr2 hw,h
find_UH $ instr2 hw, char_H
find_W $ instr2 hw, char_W
. / Instr2 has 2 arguments: Search string and the item to match.
. / Instr3 has 3 arguments: startPlaceOfSearch, the StringToSearch, theItemToFind.
. Instr2 Tests:
. Any h's in ;hw;? Answer: ;find_lh
. Any H's in ;hw;? Answer: ;find_UH
. Any W's in ;hw;? Answer: ;find_W
. The original variable hw was derived from 1st letters at (find H) ;find_uH; and at (find W);find_W;.
. / What the L? find all the places it's located, using Instr2, Instr3
. Instr3 Test:
place $ Instr2 hw,l
[
If place
+= cnt;1
. #;cnt; l resides at ;place;# in ;hw;.
+= place;1
place $ Instr3 place, hw,l
El
. / That's all the L, we found.
Exit
Fi
]
. / Testing $ spc n for spaces and $ & arg1,arg2,arg3... concatenate with &
[
+= n;1
space $ spc n
bind $ & hw, space
; bind
chars = chars + hwLen + n
Jmp chars + hwlen + n + 1 > 128
]
.
. Goodnight!
zzz
[
cnt = cnt + 1
jmp cnt > 20
rLen = int(rnd * 10) + 2
b "
cnt2 = 0
[
cnt2 = cnt2 + 1
jmp cnt2 > rLen
rChar = int(rnd * 26) + 65
rStr chr rChar
b & b, rstr
]
set AstringS, cnt, b
r = int(rnd * 100 * 100)
set AstringN, cnt, r
loc cnt, 1
; b
row = cnt + 21
loc row, 1
; r
]
saSort a$Sort AstringS
sdSort d$Sort AstringS
naSort a#sort AstringN
ndSort d#Sort AstringN
cnt = 0
[
+= cnt,1
jmp cnt > 20
get sa, saSort, cnt
get sd, sdSort, cnt
get na, naSort, cnt
get nd, ndSort, cnt
at 20, cnt
; sa
at 40, cnt
; sd
row = cnt + 21
at 20, row
; na
at 40, row
; nd
]
Zzz
BTW I notice all the functions in my Numeric Eval and Ed Davis more versatile Eval have 0 (Rnd) or 1 Arguments, what do we do for 2 or more? ;-))
' Test ak Remaining SFunctions 2-28.txt
' along with testing regular "easy to code" SFunctions get more practice with
' Set and Get our array substitute.
' oh try another way to assign with &
day date
clock time
xpix = xmax - 200
tag xpix, 10, clock
tag xpix, 30, day
sp1 chr 32
sp7 ncopy 7, sp1
test & sp7, B is Fat Left and Right!, sp7
. test string: ";test;"
bltrim ltrim test
brtrim rtrim test
btrim trim test
bshout ucase test
bwhisper lcase test
.
. ltrim B ";bltrim;"
.
. rtrim B ";brtrim;"
.
. B is looking trim ";btrim;"
.
. SHOUTING: ";bshout;"
.
. whisper: ";bwhisper;"
.
' Building an Astring with nCopy of embedded delimiter (space) to split it, brilliant!
fatx10 ncopy 10, fat!
'trim the fat
fatx10 trim fatx10
.
. fatx10
x10 split fatx10, sp1
. x10 split fatx10, sp1 is;
cnt = 1
hyph chr 45
[
x get x10, cnt
. / ; cnt;.;/ ; x
'OK for fun lets mod with concatenation (binding I am calling it)
x & cnt,hyph,x
'test modified x debug
'. x
' and back into the Astring changed
' set is like a(i) = change ( I was doing change first )
set x10, cnt, x
'debug
'. x10
+= cnt, 1
jmp cnt > 10
]
'another way to assign a string
& c,+,
. & c,+, is ;c
'checks on our new join delimiter
c1 asc c
. c1 asc c is ;c1
c2 chr c1
. c2 chr c1 is ;c2
'' this needs fixed I am too tired to think straight
'' I think it was x10 that needed a trim, YES!
'' and this kind of join is really a rejoin
'' that converts an Astring into another type of Astring
j join x10,c
. j join x10, c is ; j
by the way where is complete code ?
so you say that i must use new 1.5 hmm..i can ask why but better not ..L:O:L (Y)
but why you insist on rnd * 255...
it is simplier to made rand(255) i have that made using api
infact i have RND(1) - from 0 to 1 ,and RAND(max) from 0 to max
just thinking aloud.....
All the Redim's is because using OPTION _EXPLICIT and never have to use DIM when REDIM covers everything.
oh ..i don't know that ..With these tools you can turn strings into arrays:
ok so you have array ..that is nice ....shame on me I still don't have it in m(A)
thanks for reply...
Subscript out of bounds errors