rndgen
public text v1 · immutable sdim buf,64
randomize
#module
#deffunc rndgen var buf,int byte
repeat byte
switch rnd(3)//ここをいじれば文字種を絞れるかも。
case 0//大文字
poke buf,cnt,rnd(26)+65
swbreak
case 1//小文字
poke buf,cnt,rnd(26)+97
swbreak
case 2//数値
poke buf,cnt,rnd(10)+48
swbreak
swend
loop
return
#global
gosub *main
button gosub"ReGen",*main
stop
*main
color 255,255,255
boxf
pos 0,0
rndgen buf,20
//rndgen p1,p2
//p1 ユニーク文字列を格納する変数
//p2 バッファのサイズ
color
mes buf
return