Announcement

Collapse
No announcement yet.

3D Midi (Discussion)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 3D Midi (Discussion)

    This thread is for discussion of the 3D And Midi post by Raffaello Bervini.

    Raffaello,
    Thanks for the examples. I like them!

  • #2
    While searching out Macros for inclusion in the next version of MACROHELP I came across these macros in the code that this thread is linked to in Gary's post.
    Code:
    MACRO co0 (a,b,c)=v.xyz(0,0)=a:v.xyz(1,0)=b:v.xyz(2,0)=c
    MACRO co1 (a,b,c)=v.xyz(0,1)=a:v.xyz(1,1)=b:v.xyz(2,1)=c
    MACRO co2 (a,b,c)=v.xyz(0,2)=a:v.xyz(1,2)=b:v.xyz(2,2)=c
    MACRO co3 (a,b,c)=v.xyz(0,3)=a:v.xyz(1,3)=b:v.xyz(2,3)=c
    MACRO co4 (a,b,c)=v.xyz(0,4)=a:v.xyz(1,4)=b:v.xyz(2,4)=c
    My search for Macros also took me to this thread https://forum.powerbasic.com/forum/u...colon-in-macro
    in which José correctly states that you cannot use a colon in a single line Macro.
    While I ran the code in the previously mentioned thread and did not encounter a problem, I did not visit all features of the program. There is no error thrown when compiling the original linked to program, but a run time error may, or may not, occur because of this.

    I did notice that at least one of the Macros is used in the Statement position and if all are then they could be changed to Multi-line Macros.

    As it stands, I would like to include the Macros in the next output, but not if they have the potential to cause problems from the syntax used.
    Rod
    "To every unsung hero in the universe
    To those who roam the skies and those who roam the earth
    To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

    Comment


    • #3
      I wasn't able to compile it with Jose Roca's includes, it seems that it needs PB includes. How do I rebuild it
      with Jose's includes?
      TQ

      Comment


      • #4
        Perhaps ask that question in the José's Corner forum. I have no idea what needs adjusting since you didn't tell us what error(s) you got.
        Rod
        "To every unsung hero in the universe
        To those who roam the skies and those who roam the earth
        To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

        Comment


        • #5
          Originally posted by Anne Wilson View Post
          I wasn't able to compile it with Jose Roca's includes, it seems that it needs PB includes. How do I rebuild it
          with Jose's includes?
          TQ
          One error at a time. Change the source code to match the declares in Jose's includes. (often LONG vs DWORD, or BYVAL POINTER vs BYREF variable.)

          Or -

          Just use the PB includes. Put full path to PB includes in the #INCLUDE lines. That will override the default path to Jose's includes you've apparently got your IDE set to.

          Cheers,
          Dale

          Comment


          • #6
            One error at a time.
            Indeed! The IDE will try to help. Though the error description can be a bit 'cryptic' at times!

            See the error description in the output pane at the bottom of the editor. (drag up the editor window frame just above the Status bar if hidden from view).

            In PBWin10, the editor will open the 'offending' include file in a new tab with the cursor located at the start of the line containing the detected problem.

            That line contains a declared variable 'pi' which appears to conflict with the program being compiled.
            Change the variable name to 'pit' in the .inc file and all will be well.

            Code:
            Error 426 in C:\PBWIN10\WINAPI III 1.06\SHOBJIDL.INC(3362:006):  Variable expected
              Line 3362:    , ByRef pi As Long _                              ' __out int *pi  (<< MOD pi to pit)
            Rgds, Dave

            Comment


            • #7
              Thanks so much Dave
              I have replaced the Raffaello program 's Pi variable name with NPie and now we can compile it using Jose's includes.

              Comment


              • #8
                Anne, did you adjust the Macros from single line to multi-line, and if so, did it cause any problems?
                Rod
                "To every unsung hero in the universe
                To those who roam the skies and those who roam the earth
                To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

                Comment


                • #9
                  Hi Rodney,

                  No, I did not adjust any macros, only replaced the Pi variable name. I was only curious about its graphics display.

                  Comment


                  • #10
                    Thanks Anne. I'm coming to the conclusion that I'm wrong about the colons by themselves. I think the problem with colons only exists if there are conditional statements, like IF or SELECT in the MACRO.
                    Rod
                    "To every unsung hero in the universe
                    To those who roam the skies and those who roam the earth
                    To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

                    Comment

                    Working...
                    X