Welcome, Guest. Please login or register.

Author Topic: Amiga Basic  (Read 14679 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show all replies
    • http://www.via-altera.de
Re: Amiga Basic
« on: January 11, 2009, 12:53:43 AM »
@ bloodline

As an occasional programmer I again and again get into messes and troubles (at least when a ointer refers to a pointer and such complicated things) with pointers and references. I guess I know the logic behind it, but w/o regular practise it is often hard. But still from those three languages (C++, Matlab and Holywood) I seriously looked into I like it somehow most.

Anyway, I wanted to take the opportunity to advertise for Hollywood: Simple, but also powerful and write once, compile for MorphOS, AOS3.x, AOS4.x, Windows, OS X.

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show all replies
    • http://www.via-altera.de
Re: Amiga Basic
« Reply #1 on: January 11, 2009, 07:09:43 PM »
@ Bloodline

Thanks for your attempt to explain pointers to me. While this thank holds no irony (I always welcome occasions to think again about C++ stuff), you may have read that I alrady wrote that I have understood pointers and references is general. But when not programming too often, you soon end up in some mess.

And your suggestion to avoid pointers - well my own classes and so aree doing as much as possible. But when using the MS MFC or low level driver stuff or e.g. just want to open an Amiga window by using intuition.library you just cannot avoid heavy use of pointers.

Look, code like this is not easy to maintain if you are an occasional coder. Well, thing is it works, but if I try to reread my own code like e.g. this:

void DAQ::AOfillBuf(void* pwBuf, DWORD dwAoBufferSize,      
                       DWORD dwClk, DWORD dwChListChan, DWORD dwMode)      // fill buffer operations
{                           
   DWORD* pdwBuffer = NULL;
        WORD* pwBuffer = NULL;               
   
   pdwBuffer = (DWORD*)pwBuf;
   DWORD *myLpvResult;
   myLpvResult= reinterpret_cast(lpvResult);
   
...
}

I think it is not too intuitive (part of the mess I guess comes from MS and their many datatypes).
As said this is no rant against C++, but it is difficult when you use it only occasionally. And that is a thing many routined programmers often forget.

Offline zylesea

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 638
    • Show all replies
    • http://www.via-altera.de
Re: Amiga Basic
« Reply #2 on: January 11, 2009, 07:30:18 PM »
Quote

bloodline wrote:
@zylesea

If you find a nasty function that is complex yo use... just wrap it up in a nice friendly class, and document it well :-D

Well, that's what I do - at least the first part of your suggestion. Documentation - hmpf (singing: la la la) ;-)!