Search found 30 matches
- Thu Sep 29, 2022 10:56 pm
- Forum: BASIC programs
- Topic: Chess960 position calc and enumerate
- Replies: 1
- Views: 3599
Chess960 position calc and enumerate
This is a quick and dirty little program that calculates and lists the valid opening positions for the game of “chess 960”. There are 960 different opening positions for the variant of chess called "Fischer Random Chess", "Chess960" or "Chess9LX". Because this list of 960 variations is longer than t...
- Thu Oct 07, 2021 7:54 am
- Forum: Other topics
- Topic: Copy sB files from iOS 10 (v5.8) to iOS 14 (v6)
- Replies: 1
- Views: 1322
Copy sB files from iOS 10 (v5.8) to iOS 14 (v6)
For the longest time, I've kept my iPhone at iOS version 10 because all later iOS versions from 11 to 13 broke certain sB editor features, such as simply having the file listing sorted alphabetically instead of having files displayed in random order. With no fix forthcoming from Mr. K because of the...
- Fri Jan 15, 2021 11:57 pm
- Forum: Other topics
- Topic: Format string with PRINT command
- Replies: 4
- Views: 2982
Re: Format string with PRINT command
Unless there's a better way by simply using the format string, this is what I got:
print fmt$(123456789)
print fmt$(1234)
print fmt$(45)
print fmt$(123456789012)
end
def fmt$(a)
f$=str$(a,"###,###,###,###")
while instr(f$," ,")>0
L=instr(f$," ,")
f$=mid$(f$,L+2)
endwhile
return f$
enddef
print fmt$(123456789)
print fmt$(1234)
print fmt$(45)
print fmt$(123456789012)
end
def fmt$(a)
f$=str$(a,"###,###,###,###")
while instr(f$," ,")>0
L=instr(f$," ,")
f$=mid$(f$,L+2)
endwhile
return f$
enddef
- Fri Jan 15, 2021 8:55 pm
- Forum: Other topics
- Topic: Format string with PRINT command
- Replies: 4
- Views: 2982
Format string with PRINT command
The format string with the print command can be very useful when formatting numbers. However, when formatting large numbers using the comma for thousands, millions, and billions separator character, the following occurs: a=1234567 print "###,###,###":a ' yields: 1,234,567 a=672 print "###,###,###":a...
- Sun Dec 06, 2020 10:46 pm
- Forum: Other topics
- Topic: Smart-Basic Array Order
- Replies: 2
- Views: 2058
Re: Smart-Basic Array Order
Yes, I am aware that I cannot detect the array ordering by myself. (I tried using debug) However, it is still good to know so that I can properly order the array indexes so that sequential reading of the array is via the major index to allow the processor to cache data accesses, if possible.
- Sun Dec 06, 2020 1:19 am
- Forum: Other topics
- Topic: Smart-Basic Array Order
- Replies: 2
- Views: 2058
Smart-Basic Array Order
I have no idea whether the Apple CPU chips in the iphone and ipad devices benefit from cache memory, but just in case they do, I wanted to set the order of array indexes properly to take advantage of memory caching, especially with using large 3-dimensional arrays. To do this, I needed to determine ...
- Mon Nov 23, 2020 5:41 pm
- Forum: Other topics
- Topic: NEW VERSION!!!!
- Replies: 3
- Views: 2399
Re: NEW VERSION!!!!
Excellent work, Mr.K !! Since several of my programs use bit manipulation operations extensively (AND OR XOR BIT), I'm especially happy that all of these instructions are now fixed. The (AND OR XOR) were previously limited to 32 bits, but were extended to full 52-bit mantissa in sB version 5.7. The ...
- Mon Nov 16, 2020 11:33 pm
- Forum: Other topics
- Topic: Disconnect dropbox
- Replies: 8
- Views: 3708
Re: Disconnect dropbox
Ok, I realize that it's too late now, as you have already removed the old SB app from the App Store, but ... It is DEFINITELY POSSIBLE to have two apps share the same app sandbox. In fact, the popular programming editor app, Textastic, did exactly that. Their new version "Textastic 6" was released a...
- Fri Oct 30, 2020 4:35 am
- Forum: Other topics
- Topic: Disconnect dropbox
- Replies: 8
- Views: 3708
Re: Disconnect dropbox
That is understandable that next version of SmartBasic will not have Dropbox support, as that is what Apple requires. However, may I suggest that you release it as a NEW app, "SmartBasic 6" (slightly different icon), and leave the old one in the App Store also. If both apps shared the same "file san...
- Thu Oct 29, 2020 8:46 pm
- Forum: Other topics
- Topic: Disconnect dropbox
- Replies: 8
- Views: 3708
Re: Disconnect dropbox
The Dropbox dialog box is invoked the first time the SB user presses the Dropbox icon after invoking "option Dropbox on". No other control is allowed from SB. Using "option Dropbox off" and then "option Dropbox on" bypasses the sign-in, because that has already been done. The Dropbox app itself is t...