Author Topic: Half Brained  (Read 2640 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Half Brained
« on: October 23, 2013, 10:26:41 AM »
Quote from: Patrice Terrier - JRS forum
Now, like Bob Zale used to say, if you are not one of those half brain guy, then you should know what to do.




Anything is possible. Switch to O2 and put a smile on your half brained face.  :-X

JRS

  • Guest
Re: Half Brained
« Reply #1 on: October 23, 2013, 11:49:17 AM »
Quote from: James Fuller - JRS forum
Charles,
  Not my gcc

Code: [Select]
C:\CodeBlocks\Projects\nestes02\main.c|8|warning: ISO C forbids nested functions [-Wpedantic]|

James

Quote from: Charles Pegge - JRS forum
Hi James,
My rig is a console-and-notepad job:
I compile direct with no switches : gcc gosub.c
It compiles to a.exe which is convenient for testing

Ubuntu 64 bit Linux
Code: [Select]
jrs@laptop:~/o2wine/c_ode$ cat gosub.c
  #include <stdio.h>

  int main()
  {
    int a;
    void mygosub()
    {
     a=42;
    }
    mygosub();
    printf("%i\n",a); // 42
  }
jrs@laptop:~/o2wine/c_ode$ gcc gosub.c
jrs@laptop:~/o2wine/c_ode$ ./a.out
42
jrs@laptop:~/o2wine/c_ode$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xc51b94741af9cbe04ddca30edae439637b924117, not stripped
jrs@laptop:~/o2wine/c_ode$ ls -l a.out
-rwxrwxr-x 1 jrs jrs 8416 Oct 23 12:43 a.out
jrs@laptop:~/o2wine/c_ode$

Seems James has problems with his gcc install.


Aurel

  • Guest
Re: Half Brained
« Reply #2 on: October 24, 2013, 08:23:01 AM »
John
You probably look into JoseRoca forum from time to time and
geee it looks that  Patrice Terrier  have problem with Brice Manuel called Kuron
(read...Kurton -> try translate to croatian... ;D )
This man looks like loonytic which babeling to much about everything.. ::)

JRS

  • Guest
Re: Half Brained
« Reply #3 on: October 24, 2013, 10:02:30 AM »
Funny how things change. When I was a member (negative karma collector) any opinion that didn't idolize Bob and the perfect BASIC he created made me a hated man. Jose removes the Karma feature after I leave and everyone comes out of their shell and starts posting from the heart. This seems to be my destiny in life. Run over the burning coals and see if I make to the other side before anyone else goes for it.

 

JRS

  • Guest
Re: Half Brained
« Reply #4 on: October 30, 2013, 01:24:38 PM »
Quote from: Chris Boss - PowerBASIC forum
Looking at what Microsoft did with Visual Basic (aka. dot.net) some large company needs to step forward with a real professional BASIC compiler. Powerbasic is the perfect candidate.

Who will be the first to offer to buy PowerBASIC? I've always wanted a 32 bit QB like BASIC compiler that is hand crafted with an assembler only Bob Zale knew how to make work. I really don't need the customer base that was built over the years as they have been turned into zombies by BZ and not worth the effort removing the spell. I hear there is room at the FreeBASIC projects as life is still known to exist there. I no longer worry they have nowhere go and I'm sure Theo will represent Bob in effigy.
« Last Edit: October 30, 2013, 01:32:00 PM by John »

kryton9

  • Guest
Re: Half Brained
« Reply #5 on: October 30, 2013, 05:33:13 PM »
If no one in Mr. Zale's family is into programming or the business and just inherited it, then a sale would be a logical move.
What would be bad is if Microsoft bought it and just canned it, being a Microsoft OS dependent product.

JRS

  • Guest
Re: Half Brained
« Reply #6 on: October 30, 2013, 05:37:58 PM »
Quote
What would be bad is if Microsoft bought it and just canned it, being a Microsoft OS dependent product.

Since Stevie B. left, I think the policy might have changed and they no longer buy garbage to get it off the street. I guess they spent all the money to burn they had laying around that Steve didn't piss away.

JRS

  • Guest
Re: Half Brained
« Reply #7 on: October 31, 2013, 10:39:24 PM »
Quote from: Mike Stefanik - JRS forum

Even more fun is that you can do something like this:

Code: [Select]
void foobar()
{
    int i, x;
    
    // a lot of code goes here
    
    for (i = x = 0; i < 10; i++)
    {
        // even more code goes here
    
        if (i % 5)
        {
            int x, y, z;
    
            // put even more code here
    
            x += i; // doing something with x
            
            // and some more code here
        }
    }

    // and if the function isn't huge enough, add some more code
    // to make sure the kitchen sink is included
}

Now, a good compiler that's set to issue fairly strict warnings should complain about the fact that you're using an uninitialized 'x' ... and you may scratch your head for a second thinking, "hey, I've initialized 'x' at the top of the for loop there!" Then the proverbial light bulb will come on over your head.

Actually I think this is more fun than Mike's example. It became blatantly obvious what is going on and makes Mike look like he is posting an example for a 12 year old. C really isn't all that scary when you use syntax that makes sense.

Code: [Select]
SUB foobar()
BEGIN_SUB
    DIM AS int i, x;
    
    // a lot of code goes here
    
    FOR (i = x = 0 TO i < 10 STEP i++)
    BEGIN_FOR
        // even more code goes here
    
        IF (i MOD 5) THEN

            DIM AS int x, y, z;  // initializing variables
    
            // put even more code here
    
            x += i; // doing something with x
            
            // and some more code here
        END_IF
    NEXT

    // and if the function isn't huge enough, add some more code
    // to make sure the kitchen sink is included

END_SUB
« Last Edit: November 01, 2013, 11:33:07 AM by John »