sorry, another one...
is there a purebasic equivalent for STRING$? as in a$=string$(256,0)
i'm now delving deeply into purebasic, and there are so many things different from the way i was used to doing things, that i am sometimes lost... with the simplest of things...
browsing the forum and the docs don't always give me the answer (and i try, really!)
i'm going to put up a page with all the stupid things and mistakes i made to help other beginners out, once i get the hang of this language...
			
			
									
									
						string$
Since you are working with strings, the first place you should look is under "Strings" in the docs 
The quick answer is...
If you are filling with empty space, you can use:
a$=Space(256)
...fills a$ with 256 empty characters.
If you want to fill with a specific character, you could use:
a$=LSet("",256,"x")
...fills a$ with 256 x's
			
			
									
									
						
The quick answer is...
If you are filling with empty space, you can use:
a$=Space(256)
...fills a$ with 256 empty characters.
If you want to fill with a specific character, you could use:
a$=LSet("",256,"x")
...fills a$ with 256 x's
this is what i get for being an old timer... i'm so stuck in old basic dialects (hey, i started on an excidy sorcerer, followed by a vic20) and all the long years (10 or so?) in gfabasic have made me expect certains things... worst of it all, i expected the different basic keywords to behave the same, and that is not a very wise thing...
sorry for asking the question, i hang my head in shame
(but don't worry, i keep on asking if i don't know )
)
			
			
									
									
						sorry for asking the question, i hang my head in shame
(but don't worry, i keep on asking if i don't know
 )
)Vic20
Ah, the good old Vic20. Brings back many happy memories.!!
			
			
									
									
						- Fangbeast
- PureBasic Protozoa 
- Posts: 4792
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Exidy Sorcerer?? YA!
Gee, someone else as old as me in the forums:):) (I sure loved mine)blueznl wrote:this is what i get for being an old timer... i'm so stuck in old basic dialects (hey, i started on an excidy sorcerer, followed by a vic20) and all the long years (10 or so?) in gfabasic have made me expect certains things... worst of it all, i expected the different basic keywords to behave the same, and that is not a very wise thing...
sorry for asking the question, i hang my head in shame
(but don't worry, i keep on asking if i don't know)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
						Re: Exidy Sorcerer?? YA!
dittoFangbeast wrote:Gee, someone else as old as me in the forums:):) (I sure loved mine)
 Joe
   Joepeace  
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
						[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
still got a vic20 here   unfortunately the wrong colour
 unfortunately the wrong colour   (it's a version 2, with brown instead of orange function keys)... if anybody has the game 'multibug' laying around somewhere (it's something i wrote ages ago, and actually even sold it)
 (it's a version 2, with brown instead of orange function keys)... if anybody has the game 'multibug' laying around somewhere (it's something i wrote ages ago, and actually even sold it)
but that's entirely off topic so i better discontinue this thread
			
			
									
									
						 unfortunately the wrong colour
 unfortunately the wrong colour   (it's a version 2, with brown instead of orange function keys)... if anybody has the game 'multibug' laying around somewhere (it's something i wrote ages ago, and actually even sold it)
 (it's a version 2, with brown instead of orange function keys)... if anybody has the game 'multibug' laying around somewhere (it's something i wrote ages ago, and actually even sold it)but that's entirely off topic so i better discontinue this thread








