Wiki

Ticket #88 (closed enhancement: fixed)

Opened 16 years ago

Last modified 16 years ago

Candidates for additional HOWTo sources

Reported by: hopscc Owned by: Chuck
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Placeholder Ticket for providing additional HOWTO sources.

Attachments

UseArray-HowTo.patch Download (3.5 KB) - added by hopscc 16 years ago.

Change History

Changed 16 years ago by hopscc

Changed 16 years ago by hopscc

Example of how to make use of arrays (originally from ticket#27) and augmented from discussion on  Omitted Array Coding

Changed 16 years ago by Chuck

Will take a look this week.

Changed 16 years ago by Chuck

  • status changed from new to accepted
  • owner set to Chuck

Changed 16 years ago by Chuck

  • status changed from accepted to closed
  • resolution set to fixed

changeset:1823

I added as 186-UseArray.cobra, leaving space for 180 - 184 (list, dictionary, set).

Also, one ticket per HowTo submission, so I'm marking this one fixed.

Lots of feedback and changes on the How To. Please take note for future submissions:

  • "Dynamic typing" is not the same thing as "type inference" which is static typing that the compiler infers.
  • .Net --> .NET
  • [1,2,3] --> [1, 2, 3] (whether list or array)
  • a=b --> a == b
  • def foo( bar --> def foo(bar
  • fofset --> offset
  • Removed commented out code that is obsolete.
  • Removed code in class that printed error for non-existent file and returned. That's not how library code generally behaves.
  • Changed 256 to a var.
  • Changed "as int)[SPACE][TAB]is abstract" to "as int) is abstract"
  • Changed Byte to uint8 since uint8 is the same on .NET and Java.
  • Make use of the 'using' statement for file I/O
  • Replaced the 'stdin' string convention with .readStandardInput. 'stdin' could be a file name and could also be misspelled in code. The closest I have seen to that convention is an empty file name ("").
Note: See TracTickets for help on using tickets.