You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Python Slice Sim
05-24-2017, 05:26 PM
Post: #11
 (Print Post)
RE: Python Slice Sim
damn this forum just eat my post
it
yes << is shift bits left
OOP is not something super .Natural

Code Snippet: [Select]
Function HiWord (byval hi as long) as long
hi>>16 : function=hi  'here is shift right
End Function

oop

Code Snippet: [Select]
'CLASSES AND METHODS
'


  class stat
    method sum() as double
    method average() as double
    /\
    da(100) as double
    dn as long
  end class

  '--------------  
  methods of stat
  '==============
    
    method sum() as double
      dim i
      for i = 1 to dn
        method += da(i)
      next
    end method
    
    method average() as double
      method = sum() / dn
    end method
    
  end methods
  
  '====
  'TEST
  '====
  
  dim s as stat
  
  s.da=>2,4,6,8,10,12,14,16,18
  s.dn=9
  print `Sum: ` str(s.sum()) `       Average: ` str(s.average)

basicPro forum:
http://basicpro.mipropia.com/smf/index.php
EU Radioboard forum:
http://euradioboard.createmybb3.com/index.php
AurelSoft main site:
http://aurelsoft.ucoz.com
Find all posts by this user
Like Post
05-24-2017, 11:52 PM
Post: #12
 (Print Post)
RE: Python Slice Sim
im quite happy (sometimes) with oop as an underlying technology. other times its just bloat and overhead for no good reason.

i dont enjoy using anything when it lags, but i tolerate pythons lack of speed-- which most of the time i dont notice, because i dont have much interest in faster things that are less flexible.

but bring oop to the surface and it just gets in my way. i almost never use global variables in my functions, nor do i require instances of those functions with their own variables. nor do i need big globs of variables that are not an array or hash table. im not saying that those are useless things-- very useful for some purposes, but they are not terribly useful to me; more like a distraction. when blatant oop can be easily avoided, it keeps things simpler-- but if you like it, thats fine. its just not my thing.
Find all posts by this user
Like Post
06-30-2017, 12:40 PM (This post was last modified: 06-30-2017 12:41 PM by bplus.)
Post: #13
 (Print Post)
RE: Python Slice Sim
I have correction to make.

I told Aurel that
Code Snippet: [Select]
a << ta(i)

meant "replace" but it means to append to the a array the item ta(i)

I am sorry if I mislead anyone.

B += _
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Dreamy Clock
QB64 Member Project - Quarto
QB64 Member Project - Qubic
QB64 Member Project - Pivet version one
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Splatter
QB64 Member Project - Rubix's Magic
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Kings Valley verion one
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Rotating Background
QB64 Member Project - Score 4
QB64 Member Project - Spiro Roses
QB64 Member Project - 9 Board
QB64 Member Project - Bowditch curve
QB64 Member Project - Dakapo
QB64 Member Project - ARB Checkers
QB64 Member Project - Connect Four
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Amazon
QB64 Member Project - Basic Dithering
QB64 Member Project - Domain
QB64 Member Project - Inside Moves
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Overboard
QB64 Member Project - Othello
QB64 Member Project - Point Blank
QB64 Member Project - Algeria Weather
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Kings Court
QB64 Member Project - Pivot version two
QB64 Member Project - Color Rotating Text
QB64 Member Project - Line Thickness
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Foursight
QB64 Member Project - Input
QB64 Member Project - Exit
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Isolation
QB64 Member Project - Color Triangles
QB64 Member Project - Swirl
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Touche
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Sabotage
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Blokus
QB64 Member Project - Full Color LED Sign