Sepples
1
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 } );
2
Name:
Anonymous
2008-03-20 20:59
An anonymous array.
3
Name:
Anonymous
2008-03-20 21:02
va_list
4
Name:
Anonymous
2008-03-20 22:23
No. Use a real language
5
Name:
Anonymous
2008-03-20 22:48
Of course. There is no sepples.
6
Name:
Anonymous
2008-03-20 22:54
(int[]){2,3,5}
7
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
}
8
Name:
Anonymous
2008-03-21 2:13
>>7
Why do we have to name it, sepples user?
9
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.
10
Name:
Anonymous
2008-03-21 2:20
A true EXPERT PROGRAMMER needs only pointers.
11
Name:
Anonymous
2008-03-21 2:45
>>9
my mind boggles.
my poor sepples mind can not comprehend how you could do without
12
Name:
Anonymous
2008-03-21 3:33
13
Name:
Anonymous
2008-03-21 5:45
>>6
That's not Sepples, that's C99.
14
Name:
Anonymous
2008-03-21 5:47
Sepples has one-line comments, C has to use /* ... */. Thread over, Sepples wins.
15
Name:
Anonymous
2008-03-21 5:50
>>14
Not since C99. C wins.
16
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!
17
Name:
Anonymous
2008-03-21 8:19
>>16
HA-ISO/IEC JTC1/SC22/WG14
!
18
Name:
Anonymous
2008-03-21 9:21
19
Name:
Anonymous
2008-03-21 9:45
20
Name:
Anonymous
2008-03-21 9:53
21
Name:
Anonymous
2008-03-21 10:11
>>6
wow i learnt something
22
Name:
Anonymous
2008-03-21 10:23
23
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.
24
Name:
Anonymous
2008-03-21 19:36
>>23
>>6 is better than
>>3, and is closer to what I wanted when creating the topic.
25
Name:
Anonymous
2008-03-21 22:44
Won't sepplesox have this? Or are they just improving initializer lists?
26
Name:
Anonymous
2009-08-17 0:42
Lain.