Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Sepples

Name: Anonymous 2008-03-20 20:57

Hey /prog/, is there any way to pass an anonymous array into a function in Sepples?  For example, something like:

set_magic_numbers( { 2, 3, 5 } );

Name: Anonymous 2008-03-20 20:59

An anonymous array.

Name: Anonymous 2008-03-20 21:02

va_list

Name: Anonymous 2008-03-20 22:23

No. Use a real language

Name: Anonymous 2008-03-20 22:48

Of course. There is no sepples.

Name: Anonymous 2008-03-20 22:54

(int[]){2,3,5}

Name: Anonymous 2008-03-21 2:07

anonymous array? what?
im not sure what you mean, but this is how you pass a normal array

#include<iostream>
using namespace std;
void whateverFunction (int[]);

void main()
{
   int someArray[]={1,2,3,4,5};
   whateverFunction (someArray);
}

void whateverFunction (int someArray[])
{
   //do whatever the function does
}

Name: Anonymous 2008-03-21 2:13

>>7
Why do we have to name it, sepples user?

Name: Anonymous 2008-03-21 2:14

>>7
He means passing it without creating some useless variable. And the answer is: array literals in your Sepples? Of course not, use a real language.

Name: Anonymous 2008-03-21 2:20

A true EXPERT PROGRAMMER needs only pointers.

Name: Anonymous 2008-03-21 2:45

>>9
my mind boggles.
my poor sepples mind can not comprehend how you could do without

Name: Anonymous 2008-03-21 3:33

Name: Anonymous 2008-03-21 5:45

>>6
That's not Sepples, that's C99.

Name: Anonymous 2008-03-21 5:47

Sepples has one-line comments, C has to use /* ... */. Thread over, Sepples wins.

Name: Anonymous 2008-03-21 5:50

>>14
Not since C99. C wins.

Name: Anonymous 2008-03-21 5:57

>>15
IF YER SO SMORT THAN ESPLAIN THIS, SMARTYMAN! IF C99 CAMED FROM K$R C WHYCOME THERE STILL BE K&R C?? Hah! Your fancy science aint got no esplanation for THAT! C comments refuted, SEPPLES WINS!

Name: Anonymous 2008-03-21 8:19

>>16
HA-ISO/IEC JTC1/SC22/WG14!

Name: Anonymous 2008-03-21 9:21

>>17
wat

Name: Anonymous 2008-03-21 9:45

Name: Anonymous 2008-03-21 9:53

>>19
LOL!!

Name: Anonymous 2008-03-21 10:11

>>6
wow i learnt something

Name: Anonymous 2008-03-21 10:23

>>21
Read more C FAQ.

Name: Anonymous 2008-03-21 19:22

>>3
Thread has been answered, there is nothing further to discuss.

Enjoy leaving the happy world of type safety.

Name: Anonymous 2008-03-21 19:36

>>23
>>6 is better than >>3, and is closer to what I wanted when creating the topic.

Name: Anonymous 2008-03-21 22:44

Won't sepplesox have this? Or are they just improving initializer lists?

Name: Anonymous 2009-08-17 0:42

Lain.

Don't change these.
Name: Email:
Entire Thread Thread List