Home   Help Search Login Register  

Author Topic: Is OFP Scripting C \ C++ Lang?  (Read 662 times)

0 Members and 3 Guests are viewing this topic.

Teote

  • Guest
Is OFP Scripting C \ C++ Lang?
« on: 29 Apr 2003, 01:12:55 »
I notice that OFP scripting is just like C\C++ and I was wondering if OFP script making is C\C++, and if it is then, when OFP reads scripts will it cut out spaces like C\C++ does or is it more spaces related like VB or QBasic?  ???

I'm wondering this cause I like to write code very spaces out and easy to read and want to do that with my OFP scripts, but I'm not too sure if I can.

Also I was wondering how many people out there program and in what lang?  ;D

I program in C, C++, VB (VB Rocks), PHP, Some Python (Eewww), A little Delphi, and I'm going to be learning Java.  ;D

Teote

  • Guest
Re:Is OFP Scripting C \ C++ Lang?
« Reply #1 on: 29 Apr 2003, 02:42:08 »
You know what I realized I put this topic under Gerneral Editing when it  should have been under Gerneral Script

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Is OFP Scripting C \ C++ Lang?
« Reply #2 on: 29 Apr 2003, 02:42:32 »
Nope.

OFP scripting isn't C++, it isn't visual basic or pascal or whatever.

It is a unique language, with some aspects of a lot of different programming languages.

I strongly suggest that you ignore C++ (or whatever language you're used to) syntaxs, as when you least expect it OFP scripting will be different.

If you assume it's the same as another language (when in many cases it's not), you may end up getting into trouble ;)

Having said that, there definately are some similarities...

[size=0.5]Edit: Don't worry about it... General editing and General Scripting are going to be the same forum pretty soon anyway ;)[/size]
« Last Edit: 29 Apr 2003, 02:45:22 by Sui »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Is OFP Scripting C \ C++ Lang?
« Reply #3 on: 29 Apr 2003, 10:18:28 »
To answer the specific question about spaces, in general I think you can.

You can certainly leave as many lines spaces between each line as you like, that's no problem

and I suspect you can leave extra spaces    between      words      as well though I'm not so sure.    No harm in trying.
Plenty of reviewed ArmA missions for you to play

deaddog

  • Guest
Re:Is OFP Scripting C \ C++ Lang?
« Reply #4 on: 29 Apr 2003, 17:47:34 »
Another thing to note is that OFP scripts are interpreted, just like the old style BASIC.  That is why scripts execute so slowly.  OFP functions are preloaded (sort of compiled) and are runnning to the exclusion of everything else.  In other words, everything stops when a function is run.  But they are much faster than scripts.  That is also why functions should be very small with very short or no loops.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:Is OFP Scripting C \ C++ Lang?
« Reply #5 on: 01 May 2003, 01:53:02 »
Quote
I strongly suggest that you ignore C++ (or whatever language you're used to) syntaxs, as when you least expect it OFP scripting will be different.
rofl ;D

yeah - da best way 2 learn OFP sciptin lang is 2 learn OFP scriptin lang ::)

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta