QB64 Phoenix Edition
I dare you... - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7)
+---- Thread: I dare you... (/showthread.php?tid=1552)

Pages: 1 2 3


RE: I dare you... - eoredson - 03-16-2023

Quote:Here is some more stuff I have done without S.I.C.K.


Hehe, Touche..

Attached is the fourth structure,

Erik.


RE: I dare you... - aurel - 03-16-2023

mnrvovrfc

may i ask you what kind of code editor is that?


RE: I dare you... - luke - 03-16-2023

And for the sake of completeness, this is perfectly valid:
Code: (Select All)
For x = 1 To 10 Step 2
    For y = 1 To 10
        Select Case y
            Case Is <> x
                Print y;
        End Select
    Next
    Print
Next



RE: I dare you... - RhoSigma - 03-16-2023

(03-16-2023, 12:41 AM)eoredson Wrote: This can be done in S.I.C.K. but I dare the authors of Qb64pe to do this:

Displays 5 rows of 10 skipping every x

Code: (Select All)
10  for x=1 to 10 step 2
20      for y=1 to 10
30        select case y
40        case isnt=x
50            print y;
60        end select
70      next
80      print
90  next

CASE IS <> x



RE: I dare you... - mnrvovrfc - 03-16-2023

(03-16-2023, 03:32 AM)SMcNeill Wrote: Here is some more stuff I have done without S.I.C.K.

What if there's more code to execute which is not shown?

(Allowing someone to put the rabbit ears behind my head while I'm not noticing.)


RE: I dare you... - mnrvovrfc - 03-16-2023

(03-16-2023, 08:04 AM)aurel Wrote: mnrvovrfc

may i ask you what kind of code editor is that?

It's Kate (KDE Advanced Text Editor), in EndeavourOS (Arch Linux descendant).

I checked out Q4OS like you recommended me but with KDE Plasma (the slightly older one than EndeavourOS). I looked at the system with Trinity but I'm no longer accustomed to Windows98/WindowsXP way of working LOL. I prefer Dolphin instead of Konqueror as file manager, and a different web browser (have to use Firefox). Nice desktop though. I had to find the way to reduce the screen brightness of my laptop from maximum.


RE: I dare you... - aurel - 03-16-2023

aha...it is Kate Smile 
 
i know that i saw it somewhere ,
ahh Arch...grrr i have problems with Arch based distros..never work for me
all of them are kind of heavy on resources

yes Q4OS ...hmmm i am not very much happy about it ..it is kind of slow
i still have it installed on  my linux partition

but i am in doubt what to reinstall

between ChaletOS and XentaOS ..what you think?

just little thing ..ChaletOS have preinstalled Wine but Xenta is little bit quicker.


RE: I dare you... - SMcNeill - 03-16-2023

(03-16-2023, 02:09 PM)mnrvovrfc Wrote:
(03-16-2023, 03:32 AM)SMcNeill Wrote: Here is some more stuff I have done without S.I.C.K.

What if there's more code to execute which is not shown?

(Allowing someone to put the rabbit ears behind my head while I'm not noticing.)

In that case, simply do:

Code: (Select All)
foo

Sub foo
    Do 
        For A = 1 To 10
            For B = 1 To 10
                If Len(InKey$) Then Exit Sub
                Print A; B;
            Next
            Print
        Next
    Loop
End Sub



RE: I dare you... - mnrvovrfc - 03-16-2023

(03-16-2023, 03:23 PM)SMcNeill Wrote: In that case, simply do:

In SICK64 must instead jump to the code after the last line which is shown in the example, because that interpreter doesn't recognize subprograms.



eoredson you'll have to edit your documentation a bit, the code example has "NEXT" where there should be a "NEXTIF" to match the "FORIF", I think because I haven't tried it, I have to go back to Windows to test 32-bit stuff, don't like doing it with Linux/Wine.

Code: (Select All)
            10 FORIF M=-1,L=1 TO 10
            20    PRINT L;
            30 NEXTIF

This could be replicated in QB64(PE) (according to "FORIF" instructions in attached text file):

Code: (Select All)
5 IF M = -1 THEN
            10 FOR L=1 TO 10
            20    PRINT L;
            30 NEXT
35 END IF

EDIT: Noticed also the "SELECTIF". These weird constructs are to combine "IF" with "FOR" or some other scope construct. But it could be confusing to somebody deeply ingrained into Microsoft BASIC. The "FORIF" in particular resembles the "for(initialize; condition; update)" in C. Might as well re-create "FOR... NEXT" along those lines.


RE: I dare you... - aurel - 03-16-2023

Quote:because that interpreter doesn't recognize subprograms


hmmm ..is this a joke Confused 

I only see strange construction like EXIT FOR 2
looks like interpreter don't track NEXT iterator from FOR/NEXT stack
because he author don't have iterator after NEXT ...